A Smart Office System

Embed Size (px)

Citation preview

  • 7/21/2019 A Smart Office System

    1/36

    i

    A REPORT

    ON

    SMART OFFICE

    Software Development for Embedded Systems (CS G523 )

    by

    Abhijit Hota----------------------------

    2008A7PS095G

    BIRLA INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI

    April 2012

  • 7/21/2019 A Smart Office System

    2/36

    ii

    TABLE OF CONTENTS

    Smart Office 1UML 4

    Use Case Diagrams 5

    Class Diagrams 8

    Statechart Diagrams 10

    Activity Diagrams 13

    Sequence Diagrams 18Collaboration Diagrams 22

    Component Diagrams 25

    Deployment Diagrams 27

    Code and Simulation 28

    Bibliography 33

  • 7/21/2019 A Smart Office System

    3/36

    1

    The idea behind a Smart Office is to come up with an innovative solution to automate the control ofvarious electrical equipment and devices for different functionalities in an office space with the use ofcontrol systems and software. Such an office space eliminates human intervention to carry out certaintasks and helps prevent wastage of electrical energy. The units are controlled by processors based onthe parameters that are constantly sensed and fed to the controller through sensors present in differentparts of the building. The sensors are used to either detect human activity or quantify environmentalfactors.

    The subsystems that come under the Smart Office are:-

    Entry System

    Door System Elevator System Air-Conditioning System Lighting System Cube System Lab Authentication System Central Control System Smoke Detector System Parking Lot System

    Entry System - This system deals with the authentication of employees with a valid ID card bearing theencrypted magnetic strip/RFID. This system reads the data, extracts the ID and checks it against theemployee database for validity. If valid, it records the log in a record database. In case of a failure, itraises a trespassing alarm.

    Door System - Each of the doors in the building open automatically whenever the attached presencesensor senses someone approaching. The doors are kept open during and for some time after sensing ahuman presence. If they get no input, the doors are closed and the process is repeated.

    Elevator System Requirements - The elevator in the building works as a normal elevator, except that it isprogrammed to service to a requester floor only when there is someone present as the lift approaches

    SMART OFFICE

  • 7/21/2019 A Smart Office System

    4/36

    2

    the floor. If not, it removes the request and continues without stopping at the floor. The person waitingfor the lift is detected with the help of presence sensors.

    Air-conditioning system - The air-conditioners in each of the rooms of the building functionautomatically depending on the occupancy state and the temperature of the room. The AC is activated

    only when there are people inside the room. Once activated, the AC starts working to bring down thetemperature to a set value, and then stops. This process continues until it is deactivated in the casewhen no one is present in the room anymore. The temperature sensor is used to evaluate thetemperature in the room and a presence sensor is used for sensing people in the room.

    Lighting system - A big conference room (with a projector) may consist of more than one set of lights in aseries and the not all of them may be required based on the number of people in the room. This systemcontrols the number of lights to be switched on depending on the number of people present inside theroom. The people count is maintained by using a direction sensor installed in the doors of the room,which senses the direction of human movement through it, and accordingly increments (inwarddirection movement) or decrements (outward direction movement) the counter. The lights are switchedon or off depending on the state of the counter. Also, the lights just above the projector screen, if on,are switched off temporarily whenever the projector is switched on to increase visibility of the screen. Itswitches back on when the projector is switched off and those lights are required to be on depending onthe counter value. There is also an override button to switch on all lights of the room irrespective of thestate of occupancy.

    Cube System - The equipment in a cube, like the cube lights, desktop etc. are powered on automaticallywhenever an employee occupies his/her cube. They can be switched off by the employee manuallybefore leaving the cube or at any point of time.

    Lab Authentication System - The labs provide access to only authorized people in the office. In thissystem, there would be an ID card reader which reads the ID and checks it against the database ofauthorized IDs. If matched, it unlocks the door for the person. The person passes through and the doorlocks automatically when it closes. If there is a mismatch, a beeper is activated for some time.

    Central Control - This system allows the administrator to control all the other systems.

    Smoke Detector System - This system detects for any smoke caused by fire or short-circuits in thebuilding, and raises an alarm to alert the occupants. The alarm can be reset by the administrator when

  • 7/21/2019 A Smart Office System

    5/36

    3

    the danger is averted. There are several smoke sensors attached in different parts of the building tocheck for any emergency.

    Parking Lot System - This system controls the parking gate of the parking lot based on the category ofperson parking his/her car. There are 2 parking lanes in the building, one for the regular employees and

    the other for the visitors. The person has to swipe his/her ID card while approaching the parking entry.Depending on the ID encrypted in the card, the employee parking gate or the visitor parking gatesopens. It closes automatically after the car has passed though the gates. The exit gate of the parking lotopens with the press of a button and closes automatically after the car passes by.

  • 7/21/2019 A Smart Office System

    6/36

    4

    Unified Modeling Language (UML) is one of the most useful tool in the process of system

    development. It is a standardized general purpose modeling language in the field of object-orientedsoftware engineering. It enables system builders to create blueprints that capture the functionalities in astandard, easy-to-understand way, and provides a mechanism to effectively share and communicatethese with others. It is the brainchild of Grady Booch, James Rumbaugh and Ivar Jacobson. The standardwas set by the Object Management Group in 1997.

    The diagrams used as part of UML modeling fall into 3 categories, namely the Structure Diagrams, theBehavior Diagrams and the Interaction Diagrams.

    Structure Diagrams emphasize the things that must be present in the system being modeled. In otherwords, these diagrams represent the structure of the system . Class diagrams, component diagrams and

    deployment diagrams fall into this catrgory.

    Behavior Diagrams emphasize what must happen in the system being modeled. They describe thefunctionality of the system. This includes the use case diagrams , the state-chart diagrams and theactivity diagram .

    Interaction Diagrams , a subset of behavior diagrams, emphasize the flow of control and data among thethings in the system being modeled. It encompasses the sequence diagram and the collaborationdiagram .

    These diagrams are further explained in the next sections.

    Unified Modelling Language (UML)

  • 7/21/2019 A Smart Office System

    7/36

    5

    Use Case Diagrams

    UML Diagrams

    A use case illustrates a unit of functionality provided by the system. The main purpose of the use-case diagram is to

    help visualize the functional requirements of a system, including the relationship of "actors" (human beings or externalentities who interact with the system) to essential processes, as well as the relationships among different use cases.

    The Use-Case diagrams if the different systems of our Smart Office is given below.

    Entry System

    Air-Conditioning System

  • 7/21/2019 A Smart Office System

    8/36

    6

    Door System

    Cube SystemLight System

    Lab Authentication System

  • 7/21/2019 A Smart Office System

    9/36

    7

    Elevator System

    Central Control System

    Smoke Detector System

    Parking System

  • 7/21/2019 A Smart Office System

    10/36

    8

    Class Diagrams

    A class diagram is a type of static structure diagram that describes the structure of a system by showing the system'sclasses, their attributes, operations (or methods), and the relationships among the classes

    The Class Diagrams of the different systems of our Smart Office is given below.

  • 7/21/2019 A Smart Office System

    11/36

    9

  • 7/21/2019 A Smart Office System

    12/36

    10

    Statechart Diagrams

    The statechart diagram models different states that a system can be in and how that the transitions from state to statetake place.

    The Statechart Diagrams of the different systems of our Smart Office is given below.

    Entry System

    Entry System

  • 7/21/2019 A Smart Office System

    13/36

    11

    Door System

    Air-Conditioning System

    Light System

  • 7/21/2019 A Smart Office System

    14/36

    12

    Cube System

    Smoke Detector System

    Parking Lot Entry System

    Parking Lot Exit System

  • 7/21/2019 A Smart Office System

    15/36

    13

    Activity DiagramsActivity diagrams are graphical representations of workflows of stepwise activities with support for choice, iterationand concurrency. They are used to describe the operational step-by-step workflows of components in a system.

    The Activity Diagrams of the different systems of our Smart Office is given below.

    Entry System

  • 7/21/2019 A Smart Office System

    16/36

    14

    Door System Air-Conditioning System

    Smoke Detector System

  • 7/21/2019 A Smart Office System

    17/36

  • 7/21/2019 A Smart Office System

    18/36

    16

    Elevator System

  • 7/21/2019 A Smart Office System

    19/36

    17

    Parking Lot Entry System

    Parking Lot Exit System

  • 7/21/2019 A Smart Office System

    20/36

    18

    Sequence Diagrams

    Sequence diagrams show how processes operate with one another and in what order. They show the calls betweenthe different objects in their sequence and different calls to different objects.

    The Sequence Diagrams of the different systems of our Smart Office is given below.

    Entry System

    Door System

  • 7/21/2019 A Smart Office System

    21/36

    19

    Elevator System

    Air-Conditioning System

  • 7/21/2019 A Smart Office System

    22/36

    20

    Light System

    Lab System

    Cube System

  • 7/21/2019 A Smart Office System

    23/36

    21

    Smoke Detector System

    Parking System

  • 7/21/2019 A Smart Office System

    24/36

    22

    Collaboration DiagramsA collaboration diagram models the interactions between objects or parts in terms of sequenced messages. Messagesare labeled with a chronological number and placed near the link the message is sent over. It describes both the staticstructure and dynamic behavior of a system.

    The Collaboration Diagrams of the different systems of our Smart Office is given below.

    Entry System

    Door System

    Cube System

    Smoke System

  • 7/21/2019 A Smart Office System

    25/36

    23

    Elevator System

    Air Conditioning System

    Lighting System

  • 7/21/2019 A Smart Office System

    26/36

  • 7/21/2019 A Smart Office System

    27/36

    25

    Component Diagrams

    A component diagram provides a physical view of the system. Its purpose is to show the dependencies that thecomponents have on the other components in the system to form the whole system.

    The Component Diagrams of the different systems of our Smart Office is given below.

    Entry and Lab System Elevator System

    Other Systems

  • 7/21/2019 A Smart Office System

    28/36

    26

    Parking Lot Entry System

    Parking Lot Exit System

  • 7/21/2019 A Smart Office System

    29/36

    27

    Deployment Diagrams

    The deployment diagram shows how a system will be physically deployed in the hardware environment. Its purpose isto show where the different components of the system will physically run and how they will communicate with eachother.

    The Deployment Diagrams of the different systems of our Smart Office is given below.

    AC, Light, Door & Cube System

  • 7/21/2019 A Smart Office System

    30/36

    28

    Parking Lot Entry System

    Entry & Lab System

    Elevator System

    Cube System

    Parking Lot Exit System

  • 7/21/2019 A Smart Office System

    31/36

    29

    Code and SimulationThe start screen of thedemonstration, which presents thelist of all the system to simulate.

    1. Entry System

    The above snapshots demonstrate the entry system. The left figure shows the case of a validentry where an employee enters by swiping his ID Card. He is granted entry and the activity issuccessfully logged inside the database.

    The left figure portrays the situation when an unauthorized person tries to enter the building.An alarm is raised in this case to alert the administration.

    2. Lab System

    The above snapshots demonstrate the lab system. The left figure shows the case of valid entryin which an employee enters by swiping his ID Card. He is granted entry.

  • 7/21/2019 A Smart Office System

    32/36

    30

    The left figure portrays the situation when an unauthorized person tries to enter the building.An alarm is raised in this case to alert the administration.

    3. Cube System

    The entry of employee into his cube is detected by the occupancy sensor and controls all thecube equipment to turn on (if off).

    4. Door System

    The sensor detects the presence of an employeeand raises and event to the door controller. Thedoor opens and waits for some time till theemployee passes through it. The doors areautomatically closed if the sensor does not senseany presence.

    5. Air Conditioning System

    The AC System tries to maintain the roomtemperature within a fixed range. As soon as thetemperature increases above the threshold, the AC isturned ON. And when the temperature decreasesbelow the minimum threshold, it is turned OFF. Thissequence of actions is repeated to maintain acomfortable room temperature.

  • 7/21/2019 A Smart Office System

    33/36

    31

    6. Light System

    The light system controls lighting inside the rooms depending on the number of employeespresent. In the above figure, only 5 employees are present, thus only 2 light bulbs are lit up.

    In the figure shown below, there are 12 people inside the room, so all the 5 light bulbs are litup.

    Also, there is a light bulb over the projector screen which should be switched off in case theprojector is switched on. This is represented in the figure below.

  • 7/21/2019 A Smart Office System

    34/36

    32

    7. Parking System

    The above snapshots show the demonstration of the parking system. The left figure shows thecase of an employee approaching the parking lot. He/she swipes his/her ID card and theemployee parking gate opens up. When the vehicle is passes through the door, detected by thesensor, the doors are closed automatically.

    The left figure shows the same scenario for a visitor entering the parking lot.

    8. Smoke System

    The smoke detector is always active in the sensing state. As soon as it detects smoke, it raisesthe alarm.

  • 7/21/2019 A Smart Office System

    35/36

    33

    9. Elevator System

    The simulation for the elevator system is shown in the figure above. The entity labeled S represent the sensors, which turns red when activated, and the buttons labeled F represent thefloor buttons. The lift is called to a floor whenever a floor button is pressed. On reaching thefloor, it checks whether the sensor senses a person (S is toggled ON represented by a redcolour). If yes, then it stops at that floor, the elevator doors open for the people to get in/outand then starts to service the next requestor floor. The actions taken on stopping are shown inthe command prompt. If on reaching a requested floor, the sensor doesnt detect a person (Sbutton in green state), it removes the request by resetting the floor button and continueswithout stopping at that floor. Multiple requests can be activated at a time and the algorithmtakes care of serving each of them.

  • 7/21/2019 A Smart Office System

    36/36

    BIBLIOGRAPHY

    1. Real -Time Systems by C.M.Krishna & Kang G.Shin, McGraw-Hill InternationalEditions

    2. UML for Real Design of Embedded Real-Time systems by Bran Selic

    3. Real-Time UML: Advances In The UML For Real Time Systems (Third Edition)

    by Bruce Powel Douglass, Addison Wesley (Pearson Education).

    4. Java 2 Complete Reference (Fifth Edition) by Herbert Schildt, Tata McGraw Hill