Escolar Documentos
Profissional Documentos
Cultura Documentos
ON
SMART OFFICE
Software Development for Embedded Systems (CS G523)
by
Abhijit Hota
---------------------------2008A7PS095G
TABLE OF CONTENTS
Smart Office
UML
Class Diagrams
Statechart Diagrams
10
Activity Diagrams
13
Sequence Diagrams
18
Collaboration Diagrams
22
Component Diagrams
25
Deployment Diagrams
27
28
Bibliography
33
ii
SMART OFFICE
The idea behind a Smart Office is to come up with an innovative solution to automate the control of
various electrical equipment and devices for different functionalities in an office space with the use of
control systems and software. Such an office space eliminates human intervention to carry out certain
tasks and helps prevent wastage of electrical energy. The units are controlled by processors based on
the parameters that are constantly sensed and fed to the controller through sensors present in different
parts of the building. The sensors are used to either detect human activity or quantify environmental
factors.
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 the
encrypted magnetic strip/RFID. This system reads the data, extracts the ID and checks it against the
employee database for validity. If valid, it records the log in a record database. In case of a failure, it
raises a trespassing alarm.
Door System- Each of the doors in the building open automatically whenever the attached presence
sensor senses someone approaching. The doors are kept open during and for some time after sensing a
human 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 is
programmed to service to a requester floor only when there is someone present as the lift approaches
the floor. If not, it removes the request and continues without stopping at the floor. The person waiting
for the lift is detected with the help of presence sensors.
Air-conditioning system- The air-conditioners in each of the rooms of the building function
automatically 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 the
temperature to a set value, and then stops. This process continues until it is deactivated in the case
when no one is present in the room anymore. The temperature sensor is used to evaluate the
temperature 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 a
series and the not all of them may be required based on the number of people in the room. This system
controls the number of lights to be switched on depending on the number of people present inside the
room. 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 (inward
direction movement) or decrements (outward direction movement) the counter. The lights are switched
on 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. It
switches back on when the projector is switched off and those lights are required to be on depending on
the counter value. There is also an override button to switch on all lights of the room irrespective of the
state of occupancy.
Cube System- The equipment in a cube, like the cube lights, desktop etc. are powered on automatically
whenever an employee occupies his/her cube. They can be switched off by the employee manually
before leaving the cube or at any point of time.
Lab Authentication System- The labs provide access to only authorized people in the office. In this
system, there would be an ID card reader which reads the ID and checks it against the database of
authorized IDs. If matched, it unlocks the door for the person. The person passes through and the door
locks 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 the
building, and raises an alarm to alert the occupants. The alarm can be reset by the administrator when
the danger is averted. There are several smoke sensors attached in different parts of the building to
check for any emergency.
Parking Lot System- This system controls the parking gate of the parking lot based on the category of
person 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 gates
opens. It closes automatically after the car has passed though the gates. The exit gate of the parking lot
opens with the press of a button and closes automatically after the car passes by.
UML Diagrams
Use Case 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 external
entities 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
Light System
Cube System
Door System
Elevator System
Parking System
Class Diagrams
A class diagram is a type of static structure diagram that describes the structure of a system by showing the system's
classes, 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.
Statechart Diagrams
The statechart diagram models different states that a system can be in and how that the transitions from state to state
take place.
The Statechart Diagrams of the different systems of our Smart Office is given below.
Entry System
Entry System
10
Door System
Air-Conditioning System
Light System
11
Cube System
12
Activity Diagrams
Activity diagrams are graphical representations of workflows of stepwise activities with support for choice, iteration
and 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
13
Door System
Air-Conditioning System
14
Cube System
Light System
Lab System
15
Elevator System
16
17
Sequence Diagrams
Sequence diagrams show how processes operate with one another and in what order. They show the calls between
the 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
18
Elevator System
Air-Conditioning System
19
Light System
Lab System
Cube System
20
Parking System
21
Collaboration Diagrams
A collaboration diagram models the interactions between objects or parts in terms of sequenced messages. Messages
are labeled with a chronological number and placed near the link the message is sent over. It describes both the static
structure 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
22
Elevator System
Lighting System
23
Lab System
Parking System
24
Component Diagrams
A component diagram provides a physical view of the system. Its purpose is to show the dependencies that the
components 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.
Elevator System
Other Systems
25
26
Deployment Diagrams
The deployment diagram shows how a system will be physically deployed in the hardware environment. Its purpose is
to show where the different components of the system will physically run and how they will communicate with each
other.
The Deployment Diagrams of the different systems of our Smart Office is given below.
27
Elevator System
Cube System
28
1. Entry System
The above snapshots demonstrate the entry system. The left figure shows the case of a valid
entry where an employee enters by swiping his ID Card. He is granted entry and the activity is
successfully 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 entry
in which an employee enters by swiping his ID Card. He is granted entry.
29
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 the
cube equipment to turn on (if off).
4. Door System
The sensor detects the presence of an employee
and raises and event to the door controller. The
door opens and waits for some time till the
employee passes through it. The doors are
automatically closed if the sensor does not sense
any presence.
30
6. Light System
The light system controls lighting inside the rooms depending on the number of employees
present. 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 lit
up.
Also, there is a light bulb over the projector screen which should be switched off in case the
projector is switched on. This is represented in the figure below.
31
7. Parking System
The above snapshots show the demonstration of the parking system. The left figure shows the
case of an employee approaching the parking lot. He/she swipes his/her ID card and the
employee parking gate opens up. When the vehicle is passes through the door, detected by the
sensor, 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 raises
the alarm.
32
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 the
floor buttons. The lift is called to a floor whenever a floor button is pressed. On reaching the
floor, it checks whether the sensor senses a person (S is toggled ON represented by a red
colour). If yes, then it stops at that floor, the elevator doors open for the people to get in/out
and then starts to service the next requestor floor. The actions taken on stopping are shown in
the command prompt. If on reaching a requested floor, the sensor doesnt detect a person (S
button in green state), it removes the request by resetting the floor button and continues
without stopping at that floor. Multiple requests can be activated at a time and the algorithm
takes care of serving each of them.
33
BIBLIOGRAPHY
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
34