Mentalligent SRS

download Mentalligent SRS

of 32

Transcript of Mentalligent SRS

  • 8/13/2019 Mentalligent SRS

    1/32

    GROUP : MENTALLIGENT

    COMPANY : Minder Technology

    STN YILDIRIM 1629419

    BERK ESEROL 1534908

    EVN ASLAN 1559921

    REM GKE AYDIN 1550268

    Course : CENG 490

    Assistant : Levent BAYINDIR

    2010

    SOFTWARE

    REQUIREMENTS

    SPECIFICATIONfor

    BRAINWAVE BASED

    CONCENTRATION

    ENHANCING AND

    REHABILITATION SYSTEM

  • 8/13/2019 Mentalligent SRS

    2/32

    Table of Contents1 INTRODUCTION .......................................................................................................................... 1

    1.1 Problem Definition ......................................................................................................................... 1

    1.2 Purpose .......................................................................................................................................... 1

    1.3 Scope .............................................................................................................................................. 1

    1.4 User and Literature Survey ............................................................................................................ 1

    1.5 Definitions and Abbreviations ....................................................................................................... 1

    1.6 References ..................................................................................................................................... 3

    1.7 Overview ........................................................................................................................................ 3

    2 Overall Description .................................................................................................................... 3

    2.1 Product Perspective ....................................................................................................................... 4

    2.2 Product Functions .......................................................................................................................... 6

    2.3 Constraints, Assumptions and Dependencies ............................................................................... 9

    3 SPECIFIC REQUIREMENTS ......................................................................................................... 10

    3.1 Interface Requirements ............................................................................................................... 10

    3.1.1 User Interfaces ..................................................................................................................... 10

    3.1.2 Hardware Interfaces ............................................................................................................. 10

    3.1.3 Software Interfaces .............................................................................................................. 10

    3.2 Functional Requirements ............................................................................................................. 10

    3.2.1 User Interface ....................................................................................................................... 10

    3.2.2 Database Interface ............................................................................................................... 103.2.3 Game and AI ......................................................................................................................... 14

    3.3 Non-functional Requirements ..................................................................................................... 17

    3.3.1 Performance requirements .................................................................................................. 20

    3.3.2 Design Constraints ............................................................................................................... 20

    4 Data Model and Description ..................................................................................................... 21

    4.1 Data Description .......................................................................................................................... 22

    4.1.1 Data Objects ......................................................................................................................... 22

    4.1.2 Relationships ........................................................................................................................ 23

    4.1.3 Complete Data Model .......................................................................................................... 24

    4.1.4 Data Dictionary ..................................................................................................................... 24

    5 Behavioral Model and Description............................................................................................ 25

    5.1 Description For Software Behavior .............................................................................................. 26

    5.2 State Transition Diagrams ............................................................................................................ 27

    6 PLANNING ............................................................................................................................... 27

    6.1 Team Structure ............................................................................................................................ 27

    6.2 Estimation (Basic Schedule) ......................................................................................................... 276.3 Process Model .............................................................................................................................. 30

    7 CONCLUSION ........................................................................................................................... 30

  • 8/13/2019 Mentalligent SRS

    3/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 1

    1 INTRODUCTION

    1.1 Problem Definition

    The main concern of this BCES is to measure the magnitude and frequency of users brainwaves by

    aBCID, record them and monitor them while they are playing a game that we will create. By

    observing these changes of brainwaves, users will be able to control their brainwaves and finally

    enhance concentration.1.2 Purpose

    This software requirements specification provides a complete description and constraints of BCES.1.3 Scope

    This software system will be Concentration Enhancing and Rehabilitation Software for users of

    almost any age. This system will be designed to help users to find out how to control their

    brainwaves.

    More specifically, this system is designed to help people to control their brainwaves and finally

    enhance their concentration. At first, if they want, users will go through a training phase. While

    training there is no score or rank for users. Users will just see how to concentrate and how

    brainwave meter act according to concentration. Then they are going to play a game that we

    designed. The games purpose will be to force users to gather their attention. Since the users willsee the representation of their beta brainwaves (brainwave meter) on the screen they will learn

    how this act while they are focusing. Therefore they will learn how to concentrate not only while

    playing the game but also in normal life. Finally they will be able to enhance their concentration.

    1.4 User and Literature Survey

    1.4.1 Literature Survey

    In the late 1960's and 1970's it was learned that it was possible to recondition and retrain

    brainwave patterns. Some of this work began with training to increase alpha brainwave activity to

    increase relaxation, while other work originating at UCLA focused on uncontrolled epilepsy. This

    brainwave training is called EEG biofeedback or neurofeedback. Brainwaves occur at various

    frequencies. The classic names of these EEG bands are alpha, beta, theta and delta.

    - Beta brainwaves are small, faster brainwaves associated with a state of mental, intellectual

    activity and outwardly focused concentration.

    Beta1focused concentration( 13 to 30Hz) (1330 cycles per second)Beta2alert stateBeta3very alert, vigilantBeta4Hyper vigilant

    - Alpha brainwaves are slower and larger. They are associated with a state of relaxation and

    basically represent the brain shifting into an idling gear, relaxed and a bit disengaged, waiting to

    respond when needed. If someone merely close their eyes and begin picturing something

  • 8/13/2019 Mentalligent SRS

    4/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 2

    peaceful, in less than half a minute there begins to be an increase in alpha brainwaves.Its

    frequency is 8 Hz to 12Hz (8 to 12 cycles per second).

    - Theta brainwaves generally represent a daydream-like,rather spacey state of mind that is

    associated with mental inefficiency. At very slow levels, theta brainwave activity is a very relaxed

    state, representing the twilight zone between waking and sleep.Its frequency is 4 Hz to 8 Hz (4 to 8cycles per second).

    - Delta brainwaves are the slowest, highest amplitude (magnitude) brainwaves, and are what we

    experience when we are asleep.Its frequency is 0.5 Hz to 4Hz (0.5 to 4 cycles per second).*2

    Because the most effective brainwaves are alpha and beta according to the association level with

    the mental activities, the data acquisition device technologies are especially developed for

    extracting and catching them. Neurofeedback training is brainwave biofeedback. During typical

    training, a couple of electrodes are placed on the scalp and one or two are usually put on theearlobes. Then, high-tech electronic equipment provides real-time, instantaneous audio and visual

    feedback about your brainwave activity through these alpha and beta waves. So along the various

    companies, there are some developed hardware as this electronic devices, which is connected to

    the brain through a part of head as indicated before(brain skin or earlobes) to extract the

    brainwave data and to visualize them for different psychological purposes. So in our project we

    will try to extract these alpha and beta brainwaves as much accurate as we can, and accordingly

    we will create some control mechanisms to use this resulting data. *3

    1.4.2 Market Literature Survey

    There are three existing products in the market. They are Mind Room, BioGraph Infinity Software

    and Brain Masters. Mind Room, is mainly focused on cognitive development and stress

    management for the individuals, evaluation of objective risk factors of stress-related work for

    companies and athletes control over mind and body for the sportsmen.1

    BioGraph Infinity Software, has been developed as a biofeedback and clinical tool. The programsmain abilities are to record accurate data, to track a users learning curve both within and acrossrecording sessions and to generate reliable reports.

    2

    Brain Masters projects application areas include clinical and personal biofeedback, peak-

    performance, self-improvement, education, research, self-exploration, and brain-controlled

    systems, in addition to games, art, sports, recreation, brain calisthenics, mental conditioning and

    improvement, and virtual reality.3

    In this project we will be focusing on enhancing concentration of users. Expected audience of our

    final product will be people of almost any age, from child to adult, who wants to enhance their

    concentration.

    1http://mindroomsportsscience.com/attivita.php?id=4#neuro

    2http://www.thoughttechnology.com/bioinf.htm

    3http://www.brainmaster.com

    https://123.writeboard.com/6udpvjeyn1ba740x#fn3https://123.writeboard.com/6udpvjeyn1ba740x#fn3https://123.writeboard.com/6udpvjeyn1ba740x#fn3https://123.writeboard.com/6udpvjeyn1ba740x#fn3
  • 8/13/2019 Mentalligent SRS

    5/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 3

    1.5 Definitions and Abbreviations

    SRS : Software Requirements SpecificationBCID : Brain Computer Interface DevicesBCES : Brainwave Based Concentration Enhancing and Rehabilitation Software

    1.6 References*1 IEEE Std 830-1998: IEEE Recommended Practice for Software Requirements Specifications

    *2 Cordyon D., (2006). What is Neurofeedback?, Utah School Of Medicine, International Society for

    Neurofeedback & Research.

    *3 Wolpow Jonathan, Birbaumer Niels, McFarland Dennis, Pfurtscheller Gert, Vaughan Theresa.

    (2002). Braincomputer interfaces for communication and control. Laboratory of Nervous System

    Disorders, Wadsworth Center, New York State Department of Health, State University of New

    York, Institute of Medical Psychology and Behavioral Neurobiology, University of Tuebingen,

    Department of Psychophysiology, University of Padova, Department of Medical Informatics,

    Institute of Biomedical Engineering, Technical University of Graz.

    1.7 Overview

    This document contains two additional chapters. The first (Overall Description) is designed to

    describe the general factors that affect the product and its requirements. It contains all the

    functions performed by theBCES, constraints under which it is to operate, some assumptions

    and dependencies about the system. The second chapter (Specific Requirements) of this

    document is written primarily for designers to design a system to satisfy those requirements, and

    testers to test that the system satisfies those requirements.2 Overall Description

    In BCES, we will try to extract the brainwaves information of the user and by using that

    information we will try to maximize the duration of concentration state of the user. The way that

    we will use for this purpose is a computer game. In the game industry, there are many cognitive

    games that focuses on developing concentration of the players in a specific given time. For

    example a Nintendo DS game, Brain Age, is asking mathematics calculations to the player and the

    time is counted. The littleness of the time is the key to get more score.4Similar to the these kind of

    games, we will try to take the attention of the user and to make him/her be concentrated. So, in

    the project the main factor that affect the product and its requirements are the brainwaves of theuser and the precisions of the transformation of the brainwaves from the BCID. Because if we can

    not extract the brainwave information after applying same functions, the raw brainwave

    information will be useless for the project and the rest of the operations in the software will be

    meaningless. So, we will planning to get the brainwave information more accurately as possible as

    we can.

    In BCES, the whole system is composed of by two main parts. One of them is hardware, the other

    one is software. At the fist stage, the user login the system and to get the brainwaves of the user

    we need to have a Brain Computer Interface Device which will be provided by the company. In theprocess, after that we extract the brainwaves by the help of this device, by analyzing the features

    4http://www.lumosity.com/brain-games/attention-games

  • 8/13/2019 Mentalligent SRS

    6/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 4

    of different brainwaves(delta, alpha, theta, beta), the user will be asked to play the game

    application that we will develop. While monitoring the brainwaves, through the levels of the

    game, user will be wanted to concentrate very well to complete the level. In this process we

    expect to see the changes in the brainwaves of the user in an effective way. As mentioned above,

    the aim is to increase the Beta brainwaves which is observed at the concentration state. Because

    the concentration of the user can be varied according to his gender, age, psychology and theenvironment, we will take these factors into account and will create a game in a way of getting

    attention and focusing concentration of the user much more easily and quickly. Moreover, to

    detect the brainwaves by the device correctly and to treat the user accordingly, there will be a

    continuous literature survey in the whole process. The running mechanism of the software and so

    the game will be explained in the following subsection.

    2.1 Product Perspective

    The software will have an interface ,including tab which are consist of start-up, calibration,

    training, game and the analiysis(brain status with all the brainwaves). We think that if the brainstatus and the game are in the same interface at the same time, it can be a distractive factor for

    the user while playing the game. Instead of this we will only place a Beta wave status bar beside

    the game play window on the game tab. A sketch of the interface is as in the following.

    Figure 1 - User Interface Sketch

    The game we will have these main features;

    - The main aim of the game will be feeding the animals(the black ones in the Figure), which are the

    same kind and identical(size and color are the same) and continously moving, in the screen. After

    feeding the animals there will be no change in the appearences of the animals. So the user should

    concentrate on which animal did he/she feed before, which he/she didnt.

  • 8/13/2019 Mentalligent SRS

    7/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 5

    - The number of fodder is equal to the number of animals on the screen. The user should feed

    each animal only once. If not, the user have time punishment(the time, which begins from 0 and

    counts from the beginning of the level, will increase suddenly).

    - The animals can have different speed and move features. For example, some of them moves

    quickly on the screen, some of them are slow and moves by jumping.

    - According to the value in the Beta brainwave bar, we call it concentration-meter, the difficulty of

    the next level will be decided. For example, if the users concentration level is very high during a

    level, in the next level the number of animals to feed will more rapidly increase.

    - The main aim of the game is feeding the moving animals by clicking over each of them and keep

    this feeding time as short as possible, which means keeping the concentration state of the user as

    long as possible.

    The details of the game design and the relation between the Beta brainwaves and the level

    concept will be explained on the Behavioral Model in the section 5.

    Figure 2 - Block Diagram Of The Software

    Considering the Figure 1, the mainframe of the software is theEEG Converter part. Following to

    getting the raw data of the brainwaves via the device, the software will apply four transformations

    to extract each type of the brainwaves with observable and distinct features. After doing

    clustering, classification, and feature extraction, the user and we will be able to see the results on

    the analysis interface. This monitoring part is so crucial that it shows the success of our

    classification and feature extraction of brainwaves process. This is the first step that our software

    will do.

    The next step is to act according to the level of the Beta brainwaves of the user. The game

    application we will introduce to the user aims to normalize the level of the concentration(which

    means the level of the Beta brainwave) of the user if it is under the usual values. If it is already at

    the normal range then the game application will adapt to increase the concentration level of the

    user and see this increment on the monitoring interface. If the user are distracted, to take his

    attention and make him concentrated a simple level will be asked to completed. Artificial

    intelligence on the background will decide which difficulty level will be asked to be completed. In

  • 8/13/2019 Mentalligent SRS

    8/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 6

    this process, we will continuously monitor the changes on the brainwaves of the user. At the end

    of the game, the user is estimated to have more focused attention and be less distracted while

    doing something.

    2.2 Product Functions

    The major functions that BCES will perform could be grouped under three sections; user interface,

    database interface and game & AI. Besides of user interface and game&AI we will keep the

    information of the users like, name, password, age and the history of brainwave analysis during

    playing game. Because with the help of this database we will keep the track of the users

    concentration enhancement day by day or weekly to get a feedback from the success of the these

    trainings.

    User Interface :

    displayLogin()

    This function is used to display the login interface at the beggining of the BCES. The user fills thename and password information.

    displayCalibration()

    This function is used to display the calibration screen when pressing the calibration tab. This

    function ensures that the BCID is put on properly and the brainwaves can be extracted effectively.

    manageInterfaceTabs()

    This function manage the relations of the tabs which includes the individual interface properties.

    getKeyboardMouseInput()

    This function gets the external input from the user while playing the game or logging on the

    system.

  • 8/13/2019 Mentalligent SRS

    9/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 7

    getDeviceOutput()

    This function gets the raw brainwave information from the BCID and as an output gives thetransformed brainwaves information to the AI of the game to decide accordingly.

    Database Interface :

    createNewUser()

    This function creates a place in the database for a new user. The history information of the new

    users will be assigned to null at first.

    readUserLoginData()

    This function reads the User information such as name, password, age, etc. from the database.

    readUserHistoryData()

    This function reads the brainwave analsis history of the user when needed to get a feedback day

    by day or weekly to see whether the training has been succeeded or not.

    deleteUserLoginData()

    This function deletes the User name, password, age information from the database not to be login

    to the system anymore.

  • 8/13/2019 Mentalligent SRS

    10/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 8

    deleteUserHistoryData()

    This function deletes the analysis results history of the user completely.

    updateUserLogin()

    This function updates the account information of the user when needed to be changed.

    updateUserHistory()

    This function updates the user brainwave analysis results during the game play in the database.

    Game&AI:

    analyzeUserRank()

    This function decides the rank of the user after the game level finishes with respect to the gained

    concentration experince during the play.

    updateUserRank()

    This function enables to update the rank attribute of the user in the database.

  • 8/13/2019 Mentalligent SRS

    11/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 9

    decideNextLevel()

    This function decides and creates the next level environment according to the game parameters.

    playCurrentLevel()

    This function enables the user to play the current game.

    updateGameParameters()

    This funtion updates the game parameters at the end of each level with respect to the cumulative

    distribution of the concentration-meter results of the previous level.

    analyzeUserStatus()

    This funtion analyzes the Users brainwave status continuously from the beggining of the software.

    And monitors it on the analysis tab in the interface.

    2.3 Constraints, Assumptions and Dependencies

    Because we will use a hardware, BCID, and because the extraction level of the brainwaves

    depends on the users condition such as the thickness of the scalp, age, gender or etc., the

    threshold value for each brainwaves is decided by taking this fact into consideration. The other

    main standart that we will establish is to maintain the interfaces as simple as possible for the

    users. Because the number of types of brainwaves is known as a fact, the number of brainwaves

    types we will observe will be equal to that number. Moreover, the time of the training is limited.

    Which means we will expect an improvement in the lack of concentration of the user in an specific

    interval. The security of the database of brainwaves history of the users is important and for the

    privacy rights of the users we will develop our database part as secure as possible.

  • 8/13/2019 Mentalligent SRS

    12/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 1 0

    3 SPECIFIC REQUIREMENTS

    3.1 Interface Requirements

    3.1.1 User Interfaces

    There will be just one user interface. Since software will be used by people from almost all age

    groups it will be a user friendly interface. The colors will be hot colors that will attract people butwill not affect the eyes negatively. It will have big letters to increase readability. Looking at the content; it will have a window for the game, and at the left it will have a brainwave

    meter that displays users beta brainwave output that we obtained and processed from raw datathat come from BCID. We will not be showing complete BCID brainwave output since it will cause

    distraction of users but only beta brainwave output that we will use.3.1.2 Hardware Interfaces

    Since BCID (Epoc neuroheadset) have its own hardware interface, we will be using just that

    interface no additional interfaces.3.1.3 Software Interfaces

    Windows operating system interface will be used through the project since the BCID that we are

    going to use is compatible with Windows.There will be a simple database where users login

    information and past information (history) will be kept. Since Epoc (BCID) is used its interface will

    be used in background, but it will not take place in the user interface directly.3.2 Functional Requirements

    There are twenty three main and sub functional parts in the product and these can be grouped

    into three main groups such that user interface, database interface, game & AI.3.2.1 User InterfaceThese are the functional requirements for the user interface. There are five main functions that

    the user interface must apply: displayLogin, displayCalibration,ManageInterfaceTabs,

    getKeyboardMouseInput, getDeviceOutput.

    3.2.1.1 displayLogin()1. Description

    Multiple users can use BCES at different times. For each user, history is kept separated. Therefore,

    each must log in to the system using their own user name and password. Thus the system can

    determine the current user and use that information for database accesses. 2. Stimulus/Response Sequences

    Data Flow:Basic Data Flow

    1) User opens the application(start the software).2) Log in fields (user name and password) are appeared.3) User inserts his/her user name and password.

    Alternative Data Flows1) Wrong user name and password

  • 8/13/2019 Mentalligent SRS

    13/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 1 1

    1.1) User inserts wrong his/her user name or password.1.2) An error message is appeared to inform the user that asks to try again.

    2) Exit2.1) User closes the application.

    3) New user3.1) User clicks the new user button.3.2) New user form is displayed.

    3. Functional Requirements

    REQ-1: Users need access to the database, and open the log in page.

    REQ-2: Users have an account to log in to the server.

    3.2.1.2 displayCalibration()1. Description

    A Calibration screen is required in order to make sure the user replaced the BCID properly. User

    can not pass that screen until he/she wear the device and ready to use the program.2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) User pass the log in screen and see the calibration screen.2) User applies the instructions and see that all receptors of BCID is enable.3) Start tab is opened.

    Alternative Data Flows1) Receptors are not enable

    1.1) User is informed about which receptor is disabled.2) Skip calibration

    2.1) User is informed about that he/she can not use BCID related properties of the

    application.3. Functional Requirements

    REQ-1: User has access to the database, and opens the calibration page.REQ-2: Users have an account to log in to the server.REQ-3: User have BCID.

  • 8/13/2019 Mentalligent SRS

    14/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 1 2

    3.2.1.3 manageInterfaceTabs()1. Description

    The main screen of the application consists of five different tab segments which are Start, Game,

    Training, Calibration, Analysis. This function controls the current tab alterations using the following

    sub methods. Stimulus / response sequences and functional requirements of tab functions areidentical.

    3.2.1.3.1 displayStart()1.1 Description

    Function displays the Start tab. That tab contains various information about user previous

    activities like user concentration rank and concentration experience.3.2.1.3.2 displayGame()1.2 DescriptionFunction displays the Game tab. That tab contains the currently available games for theapplication. These games works as separated modules.3.2.1.3.3 displayTraining()1.3 DescriptionFunction displays the Training tab. That tab contains a modular training application. It aims to

    increase the coordination between the user and the BCID.3.2.1.3.4 displayCalibration()1.4 DescriptionFunction displays the Calibration tab. That tab contains the instruction and status information

    for the calibration of BCID. If user takes off the device during the application is running, this

    function is called.

    3.2.1.3.5 displayAnalysis()1.5 DescriptionFunction displays the Analysis tab. That tab contains the information of previous user activities.

    The graphical representation is used for the data. User can make customization on the range

    and displaying content of the data charts.

    2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) After log in and calibration screens, user reaches the main screen that contains tab

    manager.2) Tab manager allows the user to select the current tab.3) Each time changing the current tab, the corresponding display function is called.

    Alternative Data Flows1) Take off the BCID

  • 8/13/2019 Mentalligent SRS

    15/32

  • 8/13/2019 Mentalligent SRS

    16/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 1 4

    3. Functional RequirementsREQ-1: The BCID is calibrated.REQ-2: A BCID input needed tab or application is active.

    3.2.2 Database Interface

    These are the functional requirements for the database interface. There are seven main functions

    that the database interface of the product must apply: createNewUser, readUserLoginData,

    readUserHistoryData, deleteUserLoginDatar, deleteUserHistoryData, updateUserLogin,

    updateUserHistory.

    3.2.2.1 createNewUser()1. Description

    When a new user wants to create a new account, this method is activated. The user information is

    taken by a short registration form and using it a new user account is initialized.

    2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) User click the add new user link in the log in screen.2) User fills the registration form.3) User clicks the confirmation button.

    Alternative Data Flows1) Cancel registration

    1.1) User can cancel the new user creation process by clicking cancel button in the form

    page.2) Required fields are empty

    2.1) A warning message is displayed to inform the user about empty form fields.3) Same user name exists

    3.1) A warning message is displayed to inform the user to change his/her user name.3. Functional Requirements

    REQ-1: User has access to the database.REQ-2: All required fields of form is filled.

    REQ-3: Same user name does not exist in the database.

  • 8/13/2019 Mentalligent SRS

    17/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 1 5

    3.2.2.2 readUserLoginData()1. Description

    When the user data is needed for the log in process, this method is called. It obtains only user

    name and password information from the database.2. Stimulus/Response Sequences

    Data Flow:

    Basic Data Flow

    1) displayLogin function is called.2) User name and password fields are filled3) User clicks the log in button.

    Alternative Data Flows1) User does not exist

    1.1) A warning message is displayed to inform the user to try again or create a new account.3. Functional Requirements

    REQ-1: User has access to the database.REQ-2: User name and password fields are filled.REQ-3: User has an account.

    3.2.2.3 readUserHistoryData()

    1. Description

    When the user history data is needed to displayed, this method is called. It obtains partial or hole

    data that belongs to the user according to its parameters.

    2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) A tab or application is called that need user history data.3. Functional Requirements

    REQ-1: User has access to the database.REQ-2: User is logged in.REQ-3: A user history data related tab or application is running.

  • 8/13/2019 Mentalligent SRS

    18/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 1 6

    3.2.2.4 deleteUserLoginData()1. Description

    Function is called to data a user data completely. It is an irreversible operation. It also calls the

    deleteUserHistoryData function.

    2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) User click to delete user button in the Analysis tab.2) A warning message is displayed to inform the user that this is an irreversible operation.

    3. Functional RequirementsREQ-1: User has access to the database.REQ-2: User is logged in.

    3.2.2.5 deleteUserHistoryData()

    1. Description

    Function is used when user needs to delete his/her previous data partially or completely. It is an

    irreversible operation.

    2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) User opens the Analysis tab.2) User selects the data to delete.3) User clicks the delete button.

    Alternative Data Flows1) deleteUserLoginData function is called.

    1.1) If user is deleted using deleteUserLoginData, this function is called.3. Functional Requirements

    REQ-1: User has access to the database.REQ-2: User is logged in.

  • 8/13/2019 Mentalligent SRS

    19/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 1 7

    3.2.2.6 updateUserLogin()1. Description

    Function is called when the user needs to update his/her account information. It is an irreversible

    operation.

    2. Stimulus/Response Sequences

    Data Flow:Basic Data Flow

    1) User click to update user account button in the Analysis tab.2) A warning message is displayed to inform the user that this is an irreversible operation.

    3. Functional RequirementsREQ-1: User has access to the database.REQ-2: User is logged in.

    3.2.2.7 updateUserHistory()1. Description

    Function is called when a new data is generated by an application in the software. It is the main

    function for games to record the data of the user.

    2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) A tab or application is called that generates user data.3. Functional Requirements

    REQ-1: User has access to the database.REQ-2: User is logged in.REQ-3: A user history data related tab or application is running.

    3.2.3 Game and AI

    These are the functional requirements for the game and ai. There are six main functions that the

    game and ai part of the product must apply: analyzeUserRank, updateUserRank, decideNextLevel,

    playCurrentLevel, changeLevel, updateGameParameters, analyzeUserStatus.3.2.3.1 analyzeUserRank()1. Description

    User rank is used in order to determine the initial difficulty of the games. This function converts

    the current user rank information to the decision variables for initial game parameters.

  • 8/13/2019 Mentalligent SRS

    20/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 1 8

    2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) User starts a game.2) readUserHistoryData is called to obtain user rank data.

    3. Functional RequirementsREQ-1: User has access to the database.REQ-2: User is logged in.REQ-3: Game tab is active.REQ-4: A game is running.

    3.2.3.2 updateUserRank()1. Description

    When a game level is completed, according to the game score, user gains experience points. If

    experience points reach a specific point, user rank increases and this function is called.

    2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) User plays a game.2) User completes a level of that game.3) User concentration experience reaches a certain point.

    3. Functional RequirementsREQ-1: User has access to the database.REQ-2: User is logged in.REQ-3: Game tab is active.REQ-4: A game level is completed.

    3.2.3.3 decideNextLevel()1. Description

    According to the previous concentration point of the user from the previous level of the currentgame, ai decides the parameters of the next level of the game and calls that function.

  • 8/13/2019 Mentalligent SRS

    21/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 1 9

    2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) User plays a game.2) User completes a level of that game.

    3. Functional RequirementsREQ-1: User is logged in.REQ-2: Game tab is active.REQ-3: A game level is completed.

    3.2.3.4 playCurrentLevel()1. Description

    After deciding the next level of the current game, that function starts the level. It is called after the

    decideNextLevel function.

    2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) User plays a game.2) User completes a level of that game or starts a new game.

    3. Functional RequirementsREQ-1: User is logged in.REQ-2: Game tab is active.REQ-3: User starts a game or complete a game level.

    3.2.3.5 updateGameParameters()1. Description

    Game parameters determines the properties of the games current level. This function is calledafter decideNextLevel function in order to apply the decisions of the ai.

  • 8/13/2019 Mentalligent SRS

    22/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 2 0

    2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) User plays a game.2) User completes a level of that game or starts a new game.3) decideNextLevel is called.

    3. Functional RequirementsREQ-1: User is logged in.REQ-2: Game tab is active.REQ-3: User starts a game or complete a game level.

    3.2.3.6 analyzeUserStatus()1. Description

    Function is called before starting a game or displaying an analyze result. The output of this

    function is used as input data for ai decision function decideNextLevel.2. Stimulus/Response SequencesData Flow:Basic Data Flow

    1) User opens Game tab.2) User starts a game.

    Alternative Data Flows1) User opens Analyse tab and request status analyses.

    3. Functional RequirementsREQ-1: User is logged in.REQ-2: A game is started or a status analyze is required.

    3.3 Non-functional Requirements

    3.3.1 Performance requirements

    Simultaneous users will not be allowed on the same computer, therefore software is only

    responsible for one user at a time. However since BCID will be used there are some time related

    performance issues. Detailed explanation can be found on Design Constraints part below.

  • 8/13/2019 Mentalligent SRS

    23/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 2 1

    3.3.2 Design Constraints

    3.3.2.1 Software Standards

    830-1998IEEE Recommended Practice for Software Requirements Specifications will be used in

    this project.

    3.3.2.2 Programming Languages

    Object oriented programming languages will be used.

    3.3.2.3 Hardware Constraints

    Since the brain waves will be measured by aBCID and will be monitored on the computer, there

    will be some constraints related to this device.

    BCIDs system requirements is as follows5;

    2.4 GHz Intel Pentium 4 processor (or equivalent).

    Microsoft Windows XP with Service Pack 2, Windows Vista or Windows 7.

    1GBRAM. 50MB available disk space.

    One or two unusedUSB 2.0 ports (depending on the number of neuroheadsets you wish to use

    simultaneously.

    Also there are time related constraints of the BCID we will be using.Since some time passes while

    device recognizes the waves when user first starts to think and some time passes when user stops

    to think a bell shaped raw data is obtained from the device. Thus user have to think the same

    thought for a while to get his/her brainwaves accurately monitored.3.3.2.4 Software System Attributes

    3.3.2.4.1 Reliability:

    The software is reliable except that it has some delays6:

    - A delay while software records a thought (8 seconds)

    - A short delay when activating cognitive output when user starts and stops thinking

    3.3.2.4.2 Portability:

    A version of Windows platform is needed for the BCID, therefore software is partially portable.3.3.2.4.3 Security:

    Since the software will be used via a user interface the users will not be able to access the code of

    software and modify it accidentally. Also since we are storing users past information in the

    database, it must be secure enough to not let any person to access these information except that

    user.

    5

    http://www.emotiv.com/store/hardware/299/

    6http://www.emotiv.com/forum/messages/forum15/topic700/message4106/?phrase_id=143940#message4106

  • 8/13/2019 Mentalligent SRS

    24/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 2 2

    4 Data Model and Description

    This section describes information domain for the software.

    4.1 Data Description

    Data objects that will be managed/manipulated by the software are described in this section.The main data objects to be manipulated are the brainwaves of the user which are extracted by

    te BCID. For monitoring(in analysis tab) and database parts we will use the brainwaves

    informations. The managed data object is the level of Beta brainwaves. Because according to the

    cumulative value of Beta brainwaves of the user, the AI of the game will decide the features of the

    next level. So, the other managed data is the level of the game application. Moreover, we will

    attach a rank attribute to the users. According to the time that the user completes each level, the

    user will gain concentration experience. And after this concentration experiences reached the

    decided upper bounds, the rank of the user will increase one by one. In other words, if the users

    rank value is high then this means that this user has high ability of being in concentration state forlong time. In this situation, this high ranked user has completed the levels in shorter time and got

    more scores in each played level by being concentrated during these levels not to make mistakes.

    So the other minor data objects are the complete time, the score of each game level and

    concentration level.

    4.1.1 Data Objects

    The main data objects in the BCES are;

    Brainwaves :This data object has a name, representation(range, frequency, density etc.), unit and

    range attributes. This data object can be inherited as Delta, Theta, Alpha and Beta brainwaves.

    Game Levels : This data object has a name,representation, quantity and parameters(such as the

    number of animals, the movement type of them, time to finish the level..) attributes.

    - Game Level Completion Time : This sub-data object has range and quantity attributes.When the user consumes all the fodder, time will stop for that level. As mentioned

    previously, the time starts counting from zero for every second and if the user feed theanimals that he has fed previously more seconds will be added to the current time. For

    example while counting seconds one by one, if this situation occurs, an extra 5 seconds will

    added to the time variable. If the time will be out of the previously decided range, for

    example the user are not feeding the animals for a long time during the training, then level

    will end and next level will be decided considering this lack of concentration stage.

    - Game Level Score : This sub-data object has range and quantity attributes. While feedingthe animals that has not been fed before, an +10 points will be added to the score variable.

    Feeding wrong animal that has been fed before will not contribute to the score.

    User Data : This data object has a name, representation(including age and password variables) and

    parameters(User Rank, User Concentration Experince) attributes.

  • 8/13/2019 Mentalligent SRS

    25/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 2 3

    - User Rank :This sub-data object has only a name, quantity and range. This data object isassigned to the user after a certain number of concentration experience.

    - User Concentration Experience : This sub-data object has range and quantity attributes. Atthe end of each level, the user will gain concentration experience according to the time

    and score variables.

    4.1.2 Relationships

    Figure 3 - ERD of The Simple Data Objects

  • 8/13/2019 Mentalligent SRS

    26/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 2 4

    4.1.3 Complete Data Model

    Figure 4 - Complete Data Model

    4.1.4 Data Dictionary

    Data element 1 : Brainwaves

    Name : Delta, Theta, Alpha, Beta

    Representation : Class

    Units/Format : Hz

    Range :

    - Delta Brainwaves : 0.5 to 4Hz, 0.5 to 4 cycles per second- Theta Brainwaves : 4 to 8 Hz , 4 to 8 cycles per second- Alpha Brainwaves : 8 to 12Hz ,8 to 12 cycles per second- Beta Brainwaves : 13 to 30Hz, 13 to 30 cycles per second

  • 8/13/2019 Mentalligent SRS

    27/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 2 5

    Data element 2 : Game Level

    Name : Level 1, Level 2, ... etc

    Representation : Class

    Quantity : Up to 10 level(estimated)

    Parameters :

    - Number of animals- Randomly distributed movement types among the animals

    Very slow Very fast Jumping Serpentine(like snakes)

    - Maximum score(according to the number of animals)- Game Level Completion Time(starts from 0, up to a limit)- Game Level Score(starts from 0, up to (+10 points)* number of animals in that level)

    Data element 3 : User Data

    Name : UserName1, UserName2 ... etc

    Representation : Class

    Parameters :

    - User Rank (Rank1, Rank2..)- User Concentration Experince(100 experience / completion time of level)

    5 Behavioral Model and Description

    All behavioural models do is to describe the control structure of a system. This can be things like:

    - Sequence of operations

    - Object states

    - and Object interactions

    Furthermore, this modelling layer can also be called Dynamic Modelling. Because there is a flow in

    the software from one state of the operation we can estimate the next step to deal with.

  • 8/13/2019 Mentalligent SRS

    28/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 2 6

    5.1 Description For Software Behavior

    As indicated in the 2th and 3th sections, there will be functions related to three different stages of

    our software. By these functions we will react to the events in the software. The main events that

    couse changing in states are the changes in the Beta brainwaves of the user. Also the other

    affecting event is the change in game level. This correlative changes in the brainwave and gamelevel create the main flowing process of the BCES. Besides from these events, the actions to create

    the database of the user can be thought as events. The resulting main states are; logging to the

    system, starting BCID, extracting brainwaves, monitoring and analzing the brainwaves, updating

    database, deciding the difficulty of the game level, changes the level of game and observing the

    improvement in the concentration.

    Brainwave Game level

    The process between brainwave and game level runs as in the following.

    - In a game level;o After feeding each animal on the screen, 3 seconds will pass to enable the animals

    change their position and during this time interval the user can not feed the animals

    and shoul wait and observe the animals to feed.

    o The concentration-meter will show the amount of Beta Brainwaves of the user. Thisinformation will come from the BCID and some mentioned transformations

    following to it.

    oWhile playing the game, according to the moving number of animals in the screen,the user will be expected to concentrate on the level. Meanwhile, the value in

    concentration-meter will change naturally. Because human can not be fully focused

    in what he is doing all the time.

    o While feeding the animals(correct or wrong), the time and score will be changingcontinuously. These time and score features of the levels makes the application

    more resembled to the usual computer games.

    o When the concentration-meter reach the top limit, the color of the remaning unfedanimals will be lightened for one second. This is a award for the concentrationed

    users.o All the values of the Beta brainwaves during time of the level will be represented as

    graphically(the descents and rises) in the analysis tab and be kept in the user

    database for long-term feedback.

    - Deciding next level;o The difficulty stage of the next level will be calculated according to the cumulative

    average of the concentration-meter during the completion time of the previous

    level. Because the level of the Beta brainwaves in the concentration-meter is

    changing all the time.

    o There will be a constant incrementation in the number of animals for the nextlevel(for example 2 animal more), but by taking into consideration of the

  • 8/13/2019 Mentalligent SRS

    29/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 2 7

    cumulative average of concentration state of the user, this incrementation will be

    additionally more.(instead of 2 animal, increase 5 animal)

    o According to the completion time of previous level, the user will gain concentrationexperience. If this experience is enough to jump to next rank, the rank of the user

    will be increased by one. So the completion time and concentration experience are

    inversely correlated.

    5.2 State Transition Diagrams

    Figure 5 - State Transition Diagram of The Software

    6 PLANNING

    6.1 Team Structure

    The team consists of four people from METU Computer Engineering Department seniors.

    At the beginning of the project all of the members is responsible for doing literature search to

    gather information that will help us through the project. Then we are going to modularize theproject in a way that it can be shared among team members.

  • 8/13/2019 Mentalligent SRS

    30/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 2 8

    6.2 Estimation (Basic Schedule)

    Below some expected due dates can be seen. These are extracted form the schedule of the

    course.

    - December 6, 2010: Requirement Analysis-

    December 20, 2010: Initial Design Report- January 4, 2011: Detailed Design Report- January 11-23, 2011: Prototype Demo- May 27,2011: Final Product Demo

    Besides, we will observe the time and effort cost estimation of the project by using COCOMO

    model7.

    FUNCTION POINTS

    Parameters Simple Average Complex Count

    User

    Inputs

    User Login 3

    12User Registration 3

    User Device Data 6

    User

    Outputs

    Member Login Confirmation 4

    29

    Member Registration Confirmation 4

    User Processed Data 7

    User Game Level 7

    User Rank 7

    User

    Inquiries

    User Validation 3

    13User Analysis History 6

    User Information Update 4

    Files Analysis History File 1525

    User Account Information 10

    External

    Interfaces

    User Database 10

    41

    Device Interface 10

    Training Interface 7

    Startup Interface 7

    Calibration Interface 7

    Count 120

    7http://www.ceng.metu.edu.tr/~dogru/se3.pdf

    http://www.ceng.metu.edu.tr/~dogru/se3.pdfhttp://www.ceng.metu.edu.tr/~dogru/se3.pdfhttp://www.ceng.metu.edu.tr/~dogru/se3.pdfhttp://www.ceng.metu.edu.tr/~dogru/se3.pdf
  • 8/13/2019 Mentalligent SRS

    31/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 2 9

    COMPLEXITY ADJUSTMENT FACTOR

    1 Reliable backup and recovery 5

    2 Data communications 5

    3 Distributed processing 3

    4 Critical performance 4

    5 Heavily utilized operational environment 3

    6 On-line data entry 0

    7 Input transactions over multiple screens (on-line) 0

    8 Master file updates on-line 0

    9 Complex input/output/file/inquiries 4

    10 Complex internal processing 5

    11 Reusable code design 4

    12 Conversion and installation included in design 3

    13 Multiple installations for different organizations 1

    14 Design for facilitating change and ease of use 4

    Total Fi 41

    FP = CountTotal x [0.65 + 0.01 x Fi]

    = 120* x [0.65 + 0.01 x 41]

    = 127.2

    We decided to use an Object Oriented Programming Language. Therefore according to FP to KLOC

    transformation table;

    FP / KLOC = 30

    Project Size Estimation:

    KLOC = FP / 30

    = 127.2 / 30

    = 4.24

  • 8/13/2019 Mentalligent SRS

    32/32

    S o f t w a r e R e q u i r e m e n t S p e c i f i c a t i o n f o r B r a i n w a v e B a s e d C o n c e n t r a t i o n E n h a n c i n g 3 0

    Project Effort Estimation:

    Since we are a small group of people with good experience, our project is organic.

    Effort = abx KLOCb

    b

    = 2.4 x 4.241.05

    = 10.93 people / month

    Project Schedule Estimation:

    Time = cbx Effortd

    b

    = 2.5 x 10.930.38

    = 6.2 months

    Project Staffing Levels Estimation:

    A small group of 4 people.

    6.3 Process Model

    Waterfall Model will be used through this project. In the coding part spiral model also can be used.7 CONCLUSION

    In this project the requirements specified above will tried to be achieved at the end of the term.

    However if we complete these specifications and still have time we will be designing more games

    to meet users game taste. Namely more games will be provided so that users will have a chance to

    choose a game from a set of games. Therefore they will enjoy more while they are enhancing their

    concentration.