project
Project Name Faculty Advisor Term
Smart Crowd Management
Dr. Alhloul Winter 2017
Project Description Project Background:
Approximately 15 million people travel to the city of Makkah (or Mecca) every year. Makkah is held as the holiest city in the Islamic religion, and thus many of Makkah’s visitors are likely attend prayer at the Great Mosque. A huge portion of these people visit during the pilgrimage of Hajj, which is one of the five pillars of Islam. Having such a huge number of people in one place is bound to cause a degree of confusion and chaos, especially for those looking for a place to pray. It can be difficult to tell how many spots or how much space is available in the large and often bustling rooms of the Great Mosque. Problem Statement:
A wireless user-interface system to count, keep track of, and display visitor density from room to room in a busy public gathering space. Objective/Scope:
1. Design a system that efficiently monitors crowd density wirelessly.
2. Design an algorithm to compile information from all sources, and upload this information.
3. Design a user-interface to display the collected data in a tangible way.
Deliverables: 1. A device that counts/collects
information about the number of people in an area.
2. A hub that collects/receives information from the counters, compiles this information, and uploads it to the internet.
3. An application that takes the uploaded information and presents it in a user- friendly fashion.
Expected Benefits: ● Helps disperse control crowd density. ● Assists visitors in finding less crowded
areas of a large public space, improving visitor experience.
Team Members: ● Brett Horstketter – Mobile Software
Developer, Team Lead ● Waseem Amer – Counting System
Designer ● Almuhannad Althurwi (Meedo) –
Algorithm Software/Wireless System Developer, Treasurer
Assumptions & Constraints: ● This system will rely on Wi-Fi access to
transmit information from a hub to the user-interface.
● This system assumes a large, open indoor space.
● Self-funding will limit how many counting units can be produced.
Issues & Risks: ● Inaccurate counting may result in
confusion/frustration for application users.
● Wireless communications might cause slow refresh/counting time.
● Application will not be able to handle a realistic number of users.
● Counting methods are limited in accuracy due to the wide-open nature of the space.
Project Flexibility Matrix:
Flexibility Least Moderate Most
Scope X Schedule X
Resources X
System Level Design:
IR counter is tripped. Decision is made on
whether it is "into" or "out of" the room.
Result is transmitted to Hub.
Hub recieves information, and
updates room count.
Hub determines "fullness" of room
based on room size and current body density.
Hub compiles information.
Hub transmits information to a
"cloud."
User interface retrieves data from cloud.
User interface maps data.
User interface displays data to user.
Work Breakdown Structure:
System Implementation Overview: Tabulated below are various solution options and their pros and cons.
System User Interface
Solution Description Advantages Disadvantages Adopted solution
Android based Interface
The user interface can be designed based on the Android platform. Being the most widely used platform, the interface developed on the android will be globally applicable.
• User friendly • Easy to develop • Flexible and
easier to modify the software according to needs.
• No previous experience on Android platform.
• Will take more time to develop.
The chosen option will be a web based application, as it will provide the most access to the widest range of devices. The web based application can also be easily ported to a localized application for use on monitors throughout the building. If there is time, the Android and iOS apps will be pursued.
Web based (HTML, Java, CSS)
A web application or mobile friendly website which will work in place of a downloadable application.
• Previous experience.
• Accessible on all smartphones.
• Cost to host domain.
Apple based Interface
The app can also be developed for iOS devices, which are used world- wide.
• User Friendly • Easy to develop • Flexible.
• No previous experience with iOS programming
• Possible added cost for XCode license.
System Algorithm
Solution Description Advantages Disadvantages Adopted solution
C++ Based Algorithm
A C++ based algorithm with OOPS can be written with great ease. The algorithm can be implemented on any controller of choice and desired specification. Following major functionalities will be implemented: • Person
detection. • Enter/Exit
status check. • Recording
values. • Data
transmission.
Easier to write.
Implementable on variety of controllers with no or little change
Flexibility in programming.
Much easier to simulate on the computer prior to implementation.
Better industrial solutions like PLCs are available.
Requires learning for implementation of data transmission algorithm.
C++ based algorithm will be designed because it can be easily implemented on any microcontroller. Furthermore, C++ is quite user friendly and allows us to implement complex functionalities.
Assembly Language based
Assembly language can be used to develop the desired algorithm with following functionalities: • Counting
enters and exits.
• Controlling the input from counter hardware.
• Data sharing via ADC and DAC.
• More controller specific learning.
• It will lead to better utilization of resources of controller. This means a cheaper controller with less RAM and ROM can be used for implementation.
• Difficult to write. • Difficult to
implement wireless transmission with assembly language.
• Assembly language will take more time to implement and troubleshoot errors.
PLCs based algorithm
A graphical programming based solution can be provided. With simple and easy programming a much more efficient system can be developed to perform all desired operations.
• Easier and simple. • More efficient. • Industrially
generic solution. • Much complex
logic can be implemented easily in less time.
• Costly to buy hardware (PLCs).
• Much more power consumption than ordinary microcontrollers.
• Increased size (Nott feasible for compact solution)
System Counter
Solution Description Advantage Disadvantage Adopted solution
IR sensors based counter
IR transmitter and receiver can be used to easily implement the counting mechanism. Furthermore, the controller of desired choice can be used to interface the IR transceivers. An ADC will be needed to convert the analog electrical signal from IR sensor to the binary of ‘1’ or ‘0’.
• Simple and rugged.
• Easier to implement.
• No need to design conditioning circuit.
• Can be implemented on the desired height (Need not to be on floor).
• Extremely cost effective solution.
• Prone to errors. • Prone to blockage
by dust or some other opaque object.
• No scope of further enhancements like weight detection, gender detection etc., which is possible in other technologies.
IR based sensors will be used due to their portable nature and simplicity. The complexity of the hardware can be easily increased by using multiple sets of IR transceivers.
Mechanic al sensing solution
Pressure sensors can be used to detect the footsteps through the door to count the number of people. Such sensor will be attached on ground while the
• Unlike optical sensors, it can be covered with protection.
• Detection of multiple people possible.
• Prone to errors if foot step not placed on sensor.
• More susceptible to damage.
• Not portable (Needs installation in the floor).
people passing will be detected based on the pressure on the sensor due to their weight.
Image processing based solution
A software based solution can be implementation with the help of image processing. A camera will be used to feed the video while image processing will be used to detect the number of people.
• Fast and efficient. • Apart from person
count, their visual data and male/female classification can be performed.
• Portable solution (Hardware can be easily installed and removed.)
• Difficult to implement.
• Increased time and cost
• Much complex solution.
• Dedicated time will be needed to learn image processing.
Market Review: There are some systems that achieve a similar outcome that our system aims to. One example is Tencent Inc.’s mobile application, WeChat, which features a heat-map of the location of individuals who use the app so that people can either congregate, or avoid large groups. Another example, which is commonly used in retail stores, tracks entry and exit using IR sensors on all doors. This method gives the overall number of people in a building, or in certain areas of a building, but is limited to the use of defined doorways. A third example of crowd direction management is digital signage. This method helps control crowds by directing and updating crowds using large screens. However, this method is limited in the sense that it has no input, and no way of seeing where crowds are actually gathered. Although there are some systems and applications that are similar to the one we will develop, our system will stand apart as a combination of the three above methods, making it a competitive solution for a variety of uses.
COTS Review:
Sr. No. Component Company Type Description
1 Arduino Arduino Hardware Arduino is one of the most flexible and easy to use controllers. It contains all of the commonly required modules like ADC, DAC, USB Port etc. Will be used as the controller for the Hub
2 PLCs PLC Arduino Hardware PLCs are easy to use and efficient devices to implement any type of logic.
3 MPLAB Microchip Technology Inc.
Software MPLAB is a user-friendly platform for programming different type of controllers. It supports hundreds of controllers belonging to different families and manufacturers. Will be used to code algorithm.
Sr. No. Component Company Type Description 1 Raspberry Pi Raspberry Pi Hardware Will be used as a controller/transmitter for IR counting method. 2 Z-wave Z-wave Software communication among devices used for home automation 3 Smart Hub Samsung Hardware Easy to upload Z-wave and control the commands
Sr. No. Component Company Type Description 1 Android SDK Google Software Will be used to develop application for android devices. 2 Xcode Apple Software Will be used to develop application for iOS devices. 3 CodePen.io CodePen Software Will be used to develop/test web application.
Algorithm
Counter
User-Interface
Common Off the Shelf (COTS)
Cost Estimate: Device/Component Price Raspberry Pi B Model 3 $30 Arduino Zero $50 Misc Elec Components >$30 TOTAL PRICE $90-$110
References: [1] WeChat – http://weixin.qq.com/
[2] All-Tag Bi-Directional People Counter – http://all-tag.com/product-items/display-counter-bi- directional/
[3] Crowd Lead – http://jumbo.tv/digital-crowd-management-solutions.html
[4] Raspberry Pi 3 Model B – https://www.element14.com/community/community/raspberry-pi
[5] Arduino Zero – https://store-usa.arduino.cc/