Software Requirements Specification - CankayaUniversity/ceng-407-408-2021-2022-Smart-Traffic-System GitHub Wiki

1. INTRODUCTION

The following subsections are an overview of the entire Software Requirements Specification (SRS) document.

1.1 Purpose of the System


The purpose of this document is to present a detailed description of the Smart Traffic Systems Project system to the Users who will work with this system. It will explain what the system will do, the purpose and features of the system, the interfaces of the system. This document will be a reference to whom that would want to use the system but that can find it hard to understand.

1.2 Scope


This document gives the requirements specification for the Smart Traffic Systems program. It provides a description of the behavior of the system as well as the flow of events for each use-case. Using this system, the user will be able to see the current flow of the traffic lights, check for errors and logs, watch the broadcast of the chosen streetlight and give feedback.

1.3 Overview


The remainder of this document will be used to specify the requirements of the system. It will also be used to illustrate the various use-cases of the program.

1.4 Glossary


glossary

1.5 References


[1]"IEEE Recommended Practice for Software Requirements Specifications," in IEEE Std 830-1998 , vol., no., pp.1-40, 20 Oct. 1998, doi: 10.1109/IEEESTD.1998.88286.

2. OVERALL DESCRIPTION

The document follows the IEEE standards, yet some of the sections are discarded as they are not compatible for this project.

2.1. Product Perspective


This system is meant to simulate a managed system to reduce the likelihood of traffic while remaining as efficient as possible using ML. It calculates traffic densities using image processing, compares the densities of each road, and decides on the time the lights will be green and red. Using AI, the system will send feedback to the users if a road has traffic for a long time. The system will be used by cars/drivers and can be managed by system users.

2.2. User Characteristics


There are two user classes for the Traffic Controller system.

  • User

Users can login, check traffic lights by video broadcasts, see if everything is going properly, and contact the founders to help improve the system.

  • Devteam

They are enabled to fix problems and add new features/tools in the system.They get feedback from users who check if the system has any flaws.

  • System

System will do image processing, vehicle detection and light signal changing using different use cases automatically and continuously

2.3 General Constraints and Assumptions


  • The camera which we are going to implement into the system must recognize cars, pedestrian well enough to perform algorithms much more correctly in order to smooth traffic flow.
  • The interface of the resulting system will be easy to use and accessible without a time or location constraint.

3. REQUIREMENTS SPECIFICATION

3.1 External Interface Requirements


3.1.1. User interfaces


  • The user interface will be compatible with Windows.
  • The user shall log in to the system by using his/her password or log out from the system.
  • The user can interact with the objects in the main menu.
  • The administrator will be able to inspect the logs at any time to identify errors or logs in the system.

3.1.2. Hardware interfaces


  • Server Side

The server will have at least 32bit architecture. The server will have a hard disk with enough capacity to hold all data. And also, since image processing is resource-hungry, devices should have modern RAM and CPU.

  • Client Side

Any server, which can support the Windows environment and access to the ethernet/wifi, is acceptable.

3.1.3. Software interfaces


To prevent unauthorized access to the system, an external firewall can be connected to the application. There should also be a user authentication-login system in place to identify the System administrator.

3.1.4. Communications interfaces


There are no external communications interface requirements.

3.2 Functional Requirements

Functional Requiremnets

3.2.1. Profile Management Use Case


Use Case :

Login as User

Logout

Diagram :

figure1

Brief Description

The Profile Management diagram explains the basic operations associated with logging into the system as a user. The user is able to use the following function : Logout. Thus , the user can also use the Login function.

Initial Step by Step Description :

1.The user must log in to the system using his or her password.

1.1. If the username's password is invalid, the user should re-login.

  1. The user has the option to log out of the system.

3.2.2. Main Page Use Case


Use Case :

Reviewing the main page

Redirecting to Regions Page

Redirecting to Contact Page

Redirecting to User Profile Page

Diagram :

figure2

Brief Description :

The Main Page diagram (Figure 2) explains the basic navbar options. When the user enters the system , he/she can see all the options within the system. The user can execute functions of the Main Page , Regions Page , Contact Page and User Profile section .

Initial Step by Step Description :

1.The user sees all the details about the system in the main page once he/she is logged in.

2.If the user clicks the Regions button , he/she will be redirected to the Region's page.

3.If the user clicks the Contact button , he/she will be redirected to the Contact page.

4.If the user clicks the User button he/she can see options such as Profile and Logout.

3.2.3. Regions Page Use Case


Use Case :

Cities Option

States of the City Option

Streets of the States Option

Error Log

Log

Display Live Broadcast

Diagram :

figure3

Brief Description : The Region's Page diagram (Figure 3 ) explains the basic operations which are related to city, states and streets information from the address the user is looking for. As the user enters the region's page there are fields to fill about city, states and street information. After the user enters the address information data of traffic lights are coming out. If there is still traffic despite the traffic lights being adjusted, it is displayed as an error log. At the same time, the user can access the live broadcast of the address that he/she entered.

Initial Step by Step Description :

1.The user sees city, state and street options.

2.If the user clicks the City option, he/she will be able to select cities.

3.If the user clicks the State option, he/she will be able to select states.

4.If the user clicks the Street option, he/she will be able to select streets.

5.The user sees datas of the traffic lights which the user entered before.

6.If the user clicks the Live Broadcast option, he/she will be able to see the street of that traffic lights that he/she entered.

7.If there are any occurring errors on the traffic lights, users will be able to access these errors by error log options.

3.2.4. Contact Page Use Case

Use Case :

Contact Information

Fast Mail

Diagram :

figure4

Brief Description

The Contact Page diagram (Figure 4 ) explains the basic operations which are related to founder information and contact information. The contact information contains the information needed to reach the founder (Fax no, phone num. , e-mail address etc.).In Fast mail part, the user can reach for help or any problem simply by typing his/her email address and typing his/her message.

Initial Step by Step Description :

1.The user sees the Contact information and Fast mail part.

2.If the user clicks the Contact information button , he/she will see contact information about the founder.

3.If the user clicks the Fast Mail button , he/she will be able to send a message to the founder by typing only the email address.

3.2.5. User Page Use Case


Use Case :

Change Password

Connection Log

Diagram:

figure5

Brief Description :

The Region's Page diagram (Figure 5 ) explains the basic operations which are related to changing password and connection log. When a user clicks the change password button, the user is able to change his/her password. And when the user clicks the connection log user is able to see the last connection from where and which IP.

Initial Step by Step Description :

The user sees change password and connection log options.

If the user clicks the change password option, he/she will be able to change the password.

If the user clicks the connection log option, he/she will be able to see the last connection from where and which IP.

3.2.6. System Use Case

System Use Case

3.2.6.1 Traffic Car Detection Use Case

  • Brief Description:

    The system uses image processing to detect cars that are waiting at a red light, label them depending on their size, mark them green or red and send the information to the system with the information of the traffic lights number.

  • Initial Step by Step Description:

The system detects cars at a red light within a 30-meter range. Detected cars get labeled with their size and get marked green. Sends labeled and green marked car information back to the system. Detects the cars that couldn't pass at the green light and marks them red when the lights turn red. Sends labeled and red-marked car information back to the system. Goes back to step 1 until every car on the road is marked and labeled.

  • 3.2.6.2 Dataset and Calculation Use Case

**Brief Description: ** Collects and keeps the data of the cars waiting on each road from the system. Changes marks and labels to numerical expressions for each car and calculates traffic density for every road. Depending on the traffic density of the roads, the greater value of density will be saved as a float number and gets passed to the system with the traffic light number.

Initial Step by Step Description :

1.Gets datas from the system for each traffic light and saves them in datasets with attributes of mark colors and labels. 2. Changes labels and marks to numerical values. calculates the traffic density for every road. 3. Combines the traffic densities of opposite roads. 4. Compares traffic density values and keeps the higher value as a float. When a road is on red light, the density of the road will be compared with this float value. 5. Sends the traffic density values to the system

3.2.6.3 Traffic light Signals Use Case

Brief Description : Changes the duration of red and green lights for every road depending on the traffic density value it gets from the system.

3.3 Performance Requirements

  • The performance of the functions and each module must be satisfactory.

  • The software's overall performance will allow users to work more efficiently.

  • The system should produce better resource sharing outcomes.

  • The performance of the results and data application must be efficient and quick.

3.4 Software System Attributes


There are some requirements which aren't strictly functional. These are the constraints that the system must work within.

3.4.1. Portability


The System’s app should work on Windows.

3.4.2. Performance


  • The system should be able to load and save all video data in the database. Loading and saving operations should be as fast as possible and accurate for better productivity.

  • The system should support all individuals connecting the system at the same time. Also they should be able to gather data and upload data at any time.

3.4.3. Usability


The app interface of the system must be user-friendly and simple to use.

3.4.4. Adaptability


  • If there is any condition, for example there are some errors or video bugs. the system should know what to do in that case.
  • If there is nothing the system can do, the system must report to the people that are responsible for errors.

3.4.5. Scalability


Since this system uses Machine Learning and AI concepts, the more time passes the system recognizes cars, people in the camera much more easily. Because of that ML algorithms work much smoother as the time passes.

3.4.6. Data integrity


The system must maintain data integrity by making backups of all database updates for each record transaction.

3.5 Safety Requirement

Because this system affects the daily traffic population, it must be secure and not allow intruders to make changes or install bugs in it. Only system administrators should be able to access, modify, halt, and perform any other functions.