Vous êtes sur la page 1sur 34

2010 SOFTWARE DESCRIPTION DESIGN

for

BRAINWAVE BASED CONCENTRATION ENHANCING AND REHABILITATION SYSTEM


GROUP COMPANY STN YILDIRIM BERK ESEROL EVN ASLAN REM GKE AYDIN Course Assistant : MENTALLIGENT : Minder Technology 1629419 1534908 1559921 1550268 : CENG 490 : Levent BAYINDIR

Table of Contents 1 Introduction ......................................................................................................... 1


1.2 Purpose .......................................................................................................................................... 1 1.3 Scope .............................................................................................................................................. 1 1.4 Overview ........................................................................................................................................ 1 1.5 Definitions, Acronyms and Abbreviations ..................................................................................... 2

2 System Overview ................................................................................................. 3 3 Design Considerations .......................................................................................... 5


3.1 Design Assumptions, Dependencies and Constraints.................................................................... 5 3.2 Design Goals and Guidelines .......................................................................................................... 5

4 Data Design .......................................................................................................... 6


4.1 Data Description ............................................................................................................................ 6 4.2 Data Dictionary .............................................................................................................................. 7 Objects ............................................................................................................................................ 7

5 System Architecture ........................................................................................... 10


5.1 Architectural Design..................................................................................................................... 10 5.2 Description of Components ......................................................................................................... 12 5.2.1 Manager ............................................................................................................................... 12 5.2.2 Game .................................................................................................................................... 13 5.2.3 AI .......................................................................................................................................... 15 5.2.4 Analysis................................................................................................................................. 16 5.2.5 Login ..................................................................................................................................... 17 5.2.6 BCID ...................................................................................................................................... 18 5.2.7 Keyboard Mouse ............................................................................................................... 19 5.2.8 GUI........................................................................................................................................ 20 5.3 Design Rationale .......................................................................................................................... 21

6 User Interface Design ......................................................................................... 22


6.1 Overview of User Interface .......................................................................................................... 22 6.2 Screen Images .............................................................................................................................. 23 6.3 Screen Objects and Actions ......................................................................................................... 25 Relations Of Basic Data Objects ......................................................................................................... 28 Complete Data Model ........................................................................................................................ 29 The Whole Process Of BCES ............................................................................................................... 30

8 Libraries and Tools ............................................................................................. 30 9 Time Planning (Gannt Chart) .............................................................................. 32


9.1 Term 1 Gannt Chart The Gannt Chart of the first Term is the following Appendix. ................... 32 9.2 Term 2 Gannt Chart ..................................................................................................................... 32

10 Conclusion........................................................................................................ 32

S o f t w a r e

D e s i g n

D e s c r i p 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 INTRODUCTION
1.1 Problem Definition
The lack of concentration is one of the modern life issues and it is shown that it can be overcame by some daily training and basic rehabilitation. Moreover, people can always develop their level of concentration even if that level is not a problem for them. An increased and manageable concentration skill can be used to enhance the efficiency of human life. The main purpose of the BCES project is to create reliable concentration enhancement software using the neurofeedback technology. The software follows and records the brain activities of the user for a long period and tries to increase the users concentration values efficiently. The two main components of the software, small but well designed concentration games and the artificial intelligent system with high planning capabilities that manage the game parameters, will provide an uncomplicated and entertaining training experience to the user.

1.2 Purpose
This document is written to create a common initial design schema of the BCES project. It can be used to write a detailed design document. On the other hand, it can be useful for designers and the programmers of the project during the implementation phase as a brief summary of the detailed design of the software.

1.3 Scope
This document contains the initial description of the design of the BCES project. Since it is an initial report, it contains only the overall system and data architecture and It also contains the main interaction and interface property of the software. In the document, all components are mentioned without much detail. Thus, the detailed design part of the project is not included by this report. For more detailed explanation of the components and for more complex descriptions of the software, use the detailed design document.

1.4 Overview
This initial software design report consists of ten main part. The first part is introduction. A definition of the problem that the software based on is described in the introduction. General information about the document is also replaced here. The second part is system overview. A general overview of the project and the software system is mentioned here. The goals, objectives and benefits of the project are explained in that part. The third part is design considerations. Special design issues are addressed here. The design assumptions, dependencies and constraints are replaced here. The design goals and guidelines are also explained in that part. The fourth part is data design. The data sets and the explanation of these data sets used by the

S o f t w a r e

D e s i g n

D e s c r i p 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

software are belongs to that part. Moreover, the flow mechanism, derivations and alterations on the data are described here. The fifth part is system architecture. The a very high level and overall architecture of the software is depicted here. The system is divided into its main components. The interior structure of these components, the behaviours and missions of them and the communication between the components are detailed in that section. The sixth part is user interface design. The user interaction of the system is described here. A general structure of the graphical user interface is depicted with a series of screenshots. The functionality of the user interface is explained from the user point of view. The seventh part is detailed design. Since this documents is an initial design report, that part of the report is not deeply considered. Only the general class diagram of the system is replaced here. The explanation of that diagram is not in the scope of that report. The eighth part is libraries and tools. In that section, the properties behaviour and benefit of the the libraries, other helper software and tools for development are introduced. The ninth part is time planning. A detailed time plans and gannt chars are replaced in that section. The scope of the plans is the whole projects, thus all of the development, design and scheduling stages of the project can be found here. The tenth part is conclusion and it involves the end comments and expectations of the final product.

1.5 Definitions, Acronyms and Abbreviations


BCID: Brain Computer Interface Device BCES: Brainwave Based Concentration Enhancing Software CVS: Current Version System GPL: General Public License IDE : Integrated Development Environment SWT: Standard Widget Toolkit FFT: Fast Fourier Transform User: The person using the software with a BCID Casual user: The possible end user group for the software. Database: Collection of all information about the users. Neurofeedback: Feedback generated by the brain activities of the user.

1.6 References
1. IEEE Std 1016-1998: IEEE Recommended Practice for Software Design Descriptions 2. Mentalligent, 2010: Software Requirements Specification for Brainwave Based Concentration Enhancing and Rehabilitation System.

S o f t w a r e

D e s i g n

D e s c r i p 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 SYSTEM OVERVIEW

Figure 1 - A Screenshot from Software

BCES is system which lets the users interact with their brains and see the role of their brains in thinking process and effect of it over acting with these thoughts. The main functionality of the BCES is to keep the user in a concentration state. This functionality will be establish by cognitive games that we will design. In these games the user will be expected to handle with some tasks which requires different concentration levels. According to the analyzed brainwave distribution of the user as delta, theta, alpha and beta, the parameters of game levels will be change accordingly to make the user be more focused on these tasks. The reason that we will observe the change in concentration of the user via computer games is the reality that computer games can easily take the attention of the user and with attractive features can easily make the players focused itself for long times. So we thought that games can be used to make users concentrated for a period of time to analyze the behaviour of brainwaves during game play. The BCID will help out in this brainwaves extraction process. In BCES, our goal is to try to maximize the duration of concentration state of the user as indicated above. In the game industry, there are many cognitive games that focus 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. 4 Similar to these kinds 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 affects the product and its requirements are the brainwaves of the user 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 plan to get the brainwave information more accurately as possible as we can.

S o f t w a r e

D e s i g n

D e s c r i p 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

Figure 2 - Block Diagram Of BCES

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 log in 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 the process, after that we extract the brainwaves by the help of this device, by analyzing the features 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 Alpha and Beta brainwaves which are observed at the concentration state. Because the concentration of the user can be varied according to his gender, age, psychology and the environment, 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 sections. The functionality of BCES is to show the brain activities of the users and changing the features of the applications accordingly during process. So the main benefit of the system is to help the user to increase the general concentration, attention and memory level of him. If the user has a lack of concentration then by our system, this situation will be handled. Because we will create the game levels by the help of an AI to decide whether the user is in upper or lower concentration and memory level. The game seems to be more academic but there will be components added to the game to make the game similar to the usual and real computer games. So there will be entertainment and amusement in the game to take the attention of the user more easily. Moreover, this project can be applied for other applications rather than only game. For example

S o f t w a r e

D e s i g n

D e s c r i p 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

an music player application that plays music which of genre is decided according to the mood of the user. Because the frequencies of brainwaves are distributed according to mood of the user (including concentration), the AI part can be designed for different purposes like this. For example, if the user is unhappy than the player will play funny and cheering musics from the pre-defined database. The examples of these applications are present and used.

3 DESIGN CONSIDERATIONS
In BCES, the brainwave extraction part would be over-work for us. Because the BCID gets brainwaves as raw data and apply some transformations like FFT, classification, clustering and feature extraction, all these are a subject of signal processing which we are not very familiar with. So the company, Minder, has provided us a .jar file which include some libraries to access the raw and band data(already processed data) via some classes and methods. By the help of these libraries we will be able to manipulate and work on the brainwave data easily. In the design of the BCES, the accuracy of the Alpha-Beta brainwave interval is important for us, because the whole application will depends on the amplitude and interval of them. Furthermore, for the game design we have had to consider the communication between the game component in which ActionScript(in Flash) language will be used and other components of the system in which JAVA language will be used. For this purpose a Flash Player API Java package, named JFlashPlayer, has been chosen that lets developers play and interact with Adobe Flash Player movies within Java applications. Hence, by this package we will be able to change the game parameters from our java code.(java flash ilikisi anlatlacak biraz)

3.1 Design Assumptions, Dependencies and Constraints


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 standard 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 and only one user can run the application at a time of process. Which means we will expect an improvement in the lack of concentration of one 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.

3.2 Design Goals and Guidelines


The goal of the system will success in increment of the concentration level of the user with the help of computer games. For this purpose, we will create more than one game. In fact, the priority of the system will be to establish the games as modular. Because the portability of the games is important, we will form a isolated relation between the game, AI and user components. All the inputs will be received by a main manager component and the communication between these components will be across by this manager component. So, there will be no specification in the software for individual games. AI will changes the parameters of the game, which will be common in the games, according to the incoming inputs via manager component. The guideline of the BCES

S o f t w a r e

D e s i g n

D e s c r i p 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

is keeping the application as simple as possible. Because of the fact that focusing is important in game-play, the distracting factors will be keep at minimum. For example, the interface of BCES will be simple and the brainwave information will be shown in another tab interface. Only needed parts such as, game play, status of BCID and the Alpha-Beta brainwave stick indicator will be used. In the game design, the environment, game characters and tasks will be attractive and will not bore the users. In our system there will be no need for speed or memory usage considerations. Because we simply run a swf file and the database, that we will keep the tracks of the history of the users, will not need to keep and/or access much complex data. The usability of the project is easy to understand. The user will only put on the BCID on his head and play one of the games. The results will be calculated and kept behind the user interface. Then, the end-user will be able to see the changes on his mind during this treatment in the analysis part.

4 DATA DESIGN
4.1 Data Description
The following components will be represented and explained in section 5. Main Component: Manage Class: Manage class is the manager of whole system. Considering only information domain of the system, it is a bridge for every data transfer between different component of the system. It stores previous game level completion information as a class with an integer for completion time, an integer for game score and an integer for current rank of user. This information is asked by AI component to determine next level difficulty. Also next level difficulty is stored as integer which is requested by Game component. Manage class stores concentration data as EEGBandData which is provided by epoclib API. Concentration data is used for analysis of users current concentration. A float array of instantaneous concentration levels is stored to find users cumulative concentration. Current tab information is stored as an integer so that, manager decides which tab to be shown. Finally, user login data is stored as a composition of user information such as name and password. This information is used at login phase for confirmation. Database Component: Login: The User Login Table is the first table in the database. At first it is created as an empty table. The table is composed of two columns. The first column is the user name and stored as a String object. The user name is unique for all users, namely it is the key of the User Login table. The second column of the table is the password field; this field is String type too. The empty table is updated when users create new accounts. The table columns are updated when the user change his/her information or deletes them via User Account Information tab of the user interface. If the user changes or deletes the User Login information, then the changes have to be made in the User History table too. The details will be mentioned in that section. As a result this table is only affected by user account information changes. This table only will be accessible by Login class. Analysis: The User History table is the second table in the database. At first it is created as an empty table. The table is composed of four columns. The first column is the user name, which is unique to all users, and it is the key of the User History table. It is stored as a String object. The second column is the user experience field. Experience is stored as an Integer object. Its value is decided by the AI of the software. The third column is the user rank, which is decided by the AI of the software. Rank also is stored as an Integer Object. The fourth and the final column is the Beta brainwave data that is taken from the user while the user played the game. This brainwave is

S o f t w a r e

D e s i g n

D e s c r i p 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

stored in a HashMap object. The empty table is filled whenever a user logs in and plays a game. Then the related data is taken via Manager and the table is updated. This User History table is accessible from Analysis class. If any user name is changed in the user account information, the Login class also has to inform the Analysis class via Manager and the changes have to be applied to User History table. Game Component: Game Class: In game class, general information about any applicable game is stored. Users concentration experience and concentration rank are stored as integers. Initially this information is taken from database but as user plays the game, these parameters will be updated by a function. Game score, current level difficulty and completion time is also stored as integers. This information is taken from the game. Besides game score, level completion time and current rank information is packed as a class called game level completion information. Because AI component sends this three data as a package. They are taken via Manager. To show user their instantaneous concentration level, a concentration data is stored as float. Later on in order to obtain a cumulative concentration, these instantaneous data are stored as float array. AI Component: AI Class: Main purpose of AI class is to determine next level difficulty. Next level difficulty is stored as integer and it is calculated using three information. These are previous level score, completion time and user rank. All these information is packed in the game level completion information class. UI Component: BCID Class: This class is provided with epoclib API. It includes one instance of EEGRawData class and one instance of EEGBandData. These instances stores raw and processed brainwave data. GUI Class: GUI class stores current tab information as integer. This information decides which tab is currently active and visible. Login data is also stored for GUI to receive login information such as username and password and then to send them to confirmation.

4.2 Data Dictionary


Objects - AI : Attributes : -nextLevelDifficulty : int -previousGameLevelCompletionInformation : GameLevelCompletionInformation Methods : +calculateNextLevel() : void +getNextLevelDifficulty() : int - ANALYSIS Attributes : -userConcentrationHistory : float[] Methods : +addToConcentrationHistory(float []) : void +deleteConcentrationHistory() : void +getConcentrationHistory() : userConcentrationHistory

S o f t w a r e

D e s i g n

D e s c r i p 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

- BCID Attributes : -EEGRawData : HashMap<Integer, Queue<Double>> -EEGBandData : HashMap<Integer, List<EEGBandData>> Methods : +addEEGRawDataListener(EEGRawDataListener, long) : void +addEEGBandDataListener(EEGBandDataListener, long) : void +connectToBCI() : bool +exitApplication() : void +getEEGSampleBandData(long duration) : EEGSampleBandData +getInstantConcentrationData(EEGSampleBandData) : float +removeEEGBandDataListener(EEGBandDataListener) : void +removeEEGRawDataListener(EEGRawDataListener) : void - GAME Attributes : -currentLevelDifficulty : int -gameScore : int -instantConcentrationData : float -levelCompletionInformation : Class -levelCompletionTime : int -sampleConcentrationData : float[] -userConcentrationExperience : int -userConcentrationRank : int Methods : +getGameLevelCompletionInformation() : LevelCompletionInformation +getInstantConcentrationData() : float +getMouseKeyboardInformation() : Event +getSampleConcentrationData() : float [] +initializeGameWithGameDiffiuculty(GameLevelDifficulty) : void +updateConcentrationExperience() : void +updateRank() : void +updateSampleConcentrationData() : void - GUI Attributes : -currentTab : int -loginData : LoginData Methods : +displayAnalysisInterface() : void +displayCalibrationInterface() : void +displayGamePlay() : void +displayLoginInterface() : void +getCurrentTab() : int +getLoginData() : LoginData - KEYBOARD - MOUSE Attributes :

S o f t w a r e

D e s i g n

D e s c r i p 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

-key_UP -key_DOWN -key_RIGHT -key_LEFT -left_MOUSE_CLICK -right_MOUSE_CLICK -mouse_POSITION Methods : +getKeyboardMouseEvent() - LOGIN Attributes : -name : String -password : String -userRank : int Methods : +confirmLoginData() : bool +createNewUser(String) : void +deleteUserLoginData(String) : void +readUserLoginData(String) : String +updateUserLoginName(String) : void +updateUserLoginPassword(String) : void - MANAGER Attributes : -concentrationData : ConcantrationData -currentTab : int -nextLevelDifficulty : int -previousGameLevelCompletionInformation : GameLevelCompletionInformation -sampleConcentrationData : float[] -userLoginData : LoginData Methods : +deleteUserAnalysisDataAlert() : void +getInstantConcentrationData() : ConcentrationData +getMouseKeyboardInformation() : Event +getNextLevelDifficulty() : int +getPreviousGameLevelCompletionInformation() : GameLevelCompletionInformation +getSampleConcentrationData() : float [] +getUserConcentrationHistory() : float [] +manageInterfaceTabs(int) : void +updateUser(String name) : void +updateUserAnalysis(String name) : void

S o f t w a r e

D e s i g n

D e s c r i p 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

10

5 SYSTEM ARCHITECTURE

Figure 3 - Package Diagram Of BCES

Program architecture is composed of three packages which are the main package, database interface package and user interface package. Each package contains two or three parts which are the actual components of the whole system. The main package consists of three components which are manager, game and AI. The database package contains two sub components, log-in and analyze. The user interface package includes three components which are BCID , keyboard-mouse and GUI.

Figure 4 - Component Diagram Of BCES

5.1 Architectural Design


Among the packages, the control duties are given to the manager component. All other components interact only with the manager component and interconnections between other components are not allowed. Therefore, the manager component not only manages the system but also provides communication medium for other components. The relationships between these components are represented by the following use-case diagram. The class diagram of the whole system is in section 7.

S o f t w a r e

D e s i g n

D e s c r i p 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

11

Figure 5 - Use Case Diagram of Manager-GUI

Figure 5 - Use Case Diagram of Manager - Other Components

Figure 5 - Use Case Diagram of Manager-Game Figure 5 - Use Case Diagram Of User - BECS

S o f t w a r e

D e s i g n

D e s c r i p 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

12

5.2 Description of Components


5.2.1 Manager 5.2.1.1 Processing narrative for Manager It manages the whole system. All other components are connected to that component and they communicate via that manager component. Manager component is actually contains many event listener to answer other components needs. Moreover, it contains the exception system of the software. When a run time error occurs, this component tries to handle it. 5.2.1.2 The interface description for Manager Inputs: - Current keyboard and mouse state from relevant component. - Instant alterations of brainwave data from BCID component.. - The next game level parameters from the AI component. - End level score from the Game component. - Cummulative concentration information from the Game component. - End game rank information from the Game component. - Current tab information from GUI component. - User log-in data from the Log-in component. - Confirmation message from the Log-in component. - The user historical data from Analysis component. - Confirmation message from the Analysis component. Outputs: - GUI warning to GUI component. - Related alteration information to the GUI component. - End level data to the AI component. - End level score information to- the AI component. - Cumulative concentration information to the AI component. - Current keyboard and mouse information to the Game component. - Instant concentration information to the Game component. - Next level parameters to the Game component. - Current rank information to the Game component. - Cumulative concentration information to the Analysis component. - Related create, update, delete messages to the Login component. 5.2.1.3 Manager component processing detail - It contains the main function of the software and becomes active when the software starts. - Firstly, it receives the given login data from the GUI component. - It sends the login data to the Login component. - If it receives confirmation information from the Login component, allows the access to the main state of the program.

S o f t w a r e

D e s i g n

D e s c r i p 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

13

- It receives the current tab information from the GUI. - If the Game tab is active, it runs the Game component and starts the communication between user interface, AI and the Game and Analysis components. - If Analysis tab is active, It requests the user history from the Analysis component and send it the the GUI component. 5.2.1.4 Manager dynamic behavior

Figure 6 - Sequence Diagram of Manager

5.2.2 Game 5.2.2.1 Processing narrative for Game It provides the communication between the games attached to the system. Loading a game or removing a game is done by that component at run time. It also collect the game related data during the session and send them to the manager at the end of each game level. It also calculated the parameters and rank information if they does not need AI decisions.

S o f t w a r e

D e s i g n

D e s c r i p 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

14

5.2.2.2 The interface description for Game Inputs: - Current keyboard, mouse information from the Manager component. - Initial game file name form the Manager component. - Instant concentration data from the Manager component. - Next level game parameters from the Manager component. - End level score from the game executable. Output: - End level cumulative concentration data to the Manager component. - End level score information to the Manager component. - Current keyboard, mouse information to the game executable. - Instant concentration data to the game executable. - Next level game parameters to the game executable. - End level score to the Manager component. 5.2.2.3 Game component processing detail - It is started by the manager component. - It receives related parameters from the Manager component. - It stars and initiates the game executable with the coming parameters. - It delivers the coming concentration information and keyboard, mouse states to the game executable. - The end level information coming from the executable is sent to the Manager component. - It stores some samples information from the instant concentration data. - At the end of each game level, it receives the score information and from the game executable and sends it to the Manager component. - At the end of each game level, it sends the cumulative concentration data to the Manager component.

S o f t w a r e

D e s i g n

D e s c r i p 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

15

5.2.2.4 Game dynamic behavior

Figure 7 - Sequence Diagram Of Game

5.2.3 AI 5.2.3.1 Processing narrative for AI The AI component is started at the end of each game level by the manager component and it is used for determining the next level game parameters. 5.2.3.2 The interface description for AI Inputs: - Previous level parameters from the Manager component. - Previous level concentration data from the Manager component. - Previous level score data. - User current rank data.

S o f t w a r e

D e s i g n

D e s c r i p 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

16

Outputs: - Next level game parameters. 5.2.3.3 Game component processing detail - It is started by the Manager component. - It receives required data which is related with the previous game level session. - It uses the internal planning algorithm. - The obtained result is returned to the Manager component. 5.2.3.4 AI dynamic behavior

Figure 8 - Sequence Diagram of AI

5.2.4 Analysis 5.2.4.1 Processing narrative for Analysis This component is a kind of database interface. It is used by the Manager component when a database access is needed. It also stores the current session data which includes the logged in user information. 5.2.4.2 The interface description for Analysis Inputs: - Database read, write, update access request from the Manager component. - New cumulative concentration data. - New rank data. - New score data. Outputs: - The requested data from the database to Manager Component. - Confirmation message to the Manager component.

S o f t w a r e

D e s i g n

D e s c r i p 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

17

5.2.4.3 Analysis component processing detail - This component is started by the Manager component. - The requested database query is created and sent. - The received answer is transferred to the Manager component. 5.2.4.4 Analysis dynamic behavior

Figure 9 - Sequence Diagram Of Analysis

5.2.5 Login 5.2.5.1 Processing narrative for Login Login component is used only for authentication purposes. It communicates with the database for the user data in order to decide whether the user is registered earlier or not. After login process, this component is not called again unless a log-out operation is done. 5.2.5.2 The interface description for Login Inputs: - User-name information from the Manager component. - Password information from the Manager component.

S o f t w a r e

D e s i g n

D e s c r i p 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

18

Outputs: - The confirmation or rejection message to the Manager component. 5.2.5.3 Login component processing detail - Manager component start this component. - Manager component initiates Login component with the user data. - Login component communicates with the database and received the rejection message. - It transfers the coming message to the Manager component. 5.2.5.4 Login dynamic behavior

confirmation or

Figure 10 - Sequence Diagram Of Login

5.2.6 BCID 5.2.6.1 Processing narrative for BCID BCID is one of the user interface components. It provides the communication between the Manager component and the device. Moreover it does the corresponding calculation in order to make the coming input more understandable for the Manager component such as transform domain alterations.

S o f t w a r e

D e s i g n

D e s c r i p 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

19

5.2.6.2 The interface description for BCID Inputs: - Raw data from the interface Device. - Data request from the Manager component. Outputs: - Processed data to the Manager component. 5.2.6.3 BCID component processing detail - It is started by the Manager component. - It receives the raw data from the interface device. - It applies the required calculations on the raw data and produces the data type required from the Manager component. - The result is sent the the Manager component. 5.2.6.4 BCID dynamic behavior

Figure 11 - Sequence Diagram of BCID API

5.2.7 Keyboard Mouse 5.2.7.1 Processing narrative for Keyboard, mouse Since the system have a game playing purposes, we need a qualified communication between keyboard and mouse. This component provides the state information of both keyboard and mouse.

S o f t w a r e

D e s i g n

D e s c r i p 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

20

5.2.7.2 The interface description for Keyboard, mouse Inputs: - State information from keyboard and mouse. - Data request from the Manager component. Outputs: - Obtained data to the Manager component. 5.2.7.3 Keyboard, mouse component processing detail - It is started by the Manager component. - It receives the state data from the keyboard and mouse. - The result is sent the the Manager component. 5.2.7.4 Keyboard, mouse dynamic behavior

Figure 12 - Sequence Diagram Of Keyboard-Mouse

5.2.8 GUI 5.2.8.1 Processing narrative for GUI This component deals with the graphical user interface. It receives user input and applies the corresponding alterations accordingly. Moreover, the warning and error messages are also transmitted to the user via this component. 5.2.8.2 The interface description for GUI Inputs: - Keyboard and mouse state from the Manager component. - Alteration request from the Manager component. - Warning or error messages from the Manager component. Outputs: - Current selected game file name to the Manager component. - User request messages to the Manager component.

S o f t w a r e

D e s i g n

D e s c r i p 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

21

5.2.8.3 GUI component processing detail - It is the firstly created component by the Manage component. - It receives the login information from the user at the authentication part and passes them to the Manage component. - If authentication is done, it shows the main interface. - It reports each user alteration to the Manage component. - It manages the game files and displays the game choices for the user 5.2.8.4 GUI dynamic behavior

Figure 13 - Sequence Diagram Of GUI

5.3 Design Rationale


During the design process, our first consideration about the system is the communication issue. The communication traffic of the each component is needed to manage. Therefore, after determining our main software components, we add the Manager component to the system in order to manage the communication and data transfer between other components. Therefore, each component communicate only with the Manager class and this feature makes the software more modular. The second problem we faced with was the modularity issues of the games in the system. We may need adding more games to the system in the future, thus game handling mechanism must be modular. At that point we discussed about the user interface and game interactions. Leaving the game and user interface communication free decreases the modularity of the game. Hence we decided to let this communication issue is also handled by the Manager component and that feature makes adding new games to the system easier.

S o f t w a r e

D e s i g n

D e s c r i p 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

22

6 USER INTERFACE DESIGN


6.1 Overview of User Interface
The user interface of the system will first expect from the user to input his/her password by the provided Login interface. If the user has not had an account yet, he/she will be able to create an account by this interface also. If the user inputs wrong log in data the interface will warn the user informing that wrong log in data is inputted. Unless the user input his/her existing account or create one, he/she will not be able to see any further information about the product. After creating an account or using an existing account, and logging in the user will be able to see the actual interface of the product. This interface is composed of seven tabs. They are:

-Start Up -Calibration -Game -Brainwave Analysis -User Account Information -Help After logging; in the Start Up tab will be seen at the user interface. At this tab the user will be able to see the previous information about his/herself. Users previous concentration rank and concentration experience will be displayed. After having seen the Start Up tab, user can pass to Calibration tab. In this Calibration tab the user will be see the instructions that describes how to wear the BCID, how to understand whether the device is functioning properly etc. The user will see a representative scene of the device showing all the nodes on it. The nodes that are functioning properly will be seen in red color, the ones that functioning properly will be seen in green color. The user has to make sure that all the nodes functioning properly. Otherwise the user will not be able to start the game and play it. In the Game tab user will see available game(s) names and a small picture taken from the game scene. The user will be able to choose the game he/she wants. Then the user will see the game opening. After the game is opened the user will play the game until the session is over. User then will see the current concentration rank and concentration experience. Then the game will be over. In the Brainwave Analysis tab the user will see his/her previous (history) information represented in a graphic. The user will be able to see how his /her brainwaves were acted during the game in the previous sessions and therefore see the changes time by time. At User Account Information tab, the user will be able to see his/her user name and password information. User can delete his/her account or make some modifications on it. If user account is deleted also the user history information is deleted automatically. At the Help tab the user will see the frequently confronted problems solution, and the basic information about the software. For example; what are the functionalities of tabs that are present in the interface, if a problem exists device what to do, how to learn playing the game etc. Also there will be a BCID status figures present all the time. So that the user will be able to see the

S o f t w a r e

D e s i g n

D e s c r i p 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

23

device status all the time also while playing the game. The user will see whether the device lacks functionality or works with full functionality at that instant. If there are nodes that lack at functionality, the problematic nodes, they will be displayed with red circle, the full functionality ones will be displayed with green circles. Hence the user will be aware of the dis-functionalities while playing the game.

6.2 Screen Images

Figure 14 - Interface Of Start-Up Tab

Figure 15 - Interface of Calibration Tab

S o f t w a r e

D e s i g n

D e s c r i p 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

24

Figure 16 - Interface Of Game Tab

Figure 17 - Interface of Analysis Tab

S o f t w a r e

D e s i g n

D e s c r i p 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

25

Figure 18 - Interface of User Account

Figure 19 - Interface of BCID

6.3 Screen Objects and Actions


In the user interface, the user will be welcomed by a login interface to the system. In login interface there will be User Name and User Password screen objects. User Name and User Password : Whenever the user logging in to the system with the correct information, the related user account data including login data and analysis history data will be taken from the database. The analysis history data will be represented graphically in the analysis tab in the following interface. After logging in, as indicated in the section 6.1 and in the former figure, there will be 5 tabs as screen objects. The transitions between these tabs will be managed by Manager Component

S o f t w a r e

D e s i g n

D e s c r i p 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

26

Start-up : In the Start-up tab the background information of the user will be displayed. The information about user previous activities like user concentration rank and concentration experience will be taken from the database with the related user login account information. Calibration : In this tab, the displayed BCID status information will be extracted form BCID component. The BCID status information shows a picture of a representative brain with the following: if the device is placed properly, the 16 sensor of the headset which are placed on the user scalp will be displayed in green color in the representative figure. If there is a sensor that can not tune into electric signals produced by the brain of user effeciently, then its color will be red. Therefore, in this tab the user will be led to turn all the color of the sensors into green by some instructions. Games : In this tab there will be a concentration-meter bar showing the real-time amplitude of beta brainwave of user. This information will be extracted from the BCID component. In this tab, there will be thumbnails of different games. When the user chooses one of them, the SWF file of the related Flash game will run. While playing the game, the user can see the changes in the concentration-meter simultaneously. Brainwave Analysis : In this screen object, the current behaviour of the brainwaves bill be displayed. The brainwave status information will be extracted from BCID component in real-time. Additional to these, there will be also User Account Information, BCID Status and Help objects in the interface. User Account Information : In this part of the interface, the current user informations will be seen. If needed the user will be able to update the user name or password information or even can delete yourself from the database completely. If user deletes the account all the information related to that user including user name,password and the history data will be deleted from the database. BCID Status : In this part of the interface, the current BCID connection status will be displayed continuously during the running application. If the sensors changes their proper positions, then the user should placed them until all are in green color again. Help : With the help of this object, the functionality of other tabs will be explained to the user. Only a text message will be displayed on the screen as a pop-up.

S o f t w a r e

D e s i g n

D e s c r i p 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

27

7 DETAILED DESIGN
The detailed design will be explained in the next Description Design Report. The followings are the class diagram, activation diagram, and state diagrams of the whole system.

S o f t w a r e

D e s i g n

D e s c r i p 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

28

Relations Of Basic Data Objects

Figure 3 - ERD of The Simple Data Objects

S o f t w a r e

D e s i g n

D e s c r i p 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

29

Complete Data Model

Figure 4 - Complete Data Model

S o f t w a r e

D e s i g n

D e s c r i p 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

30

The Whole Process Of BCES

Figure 5 - State Transition Diagram of The Software

8 LIBRARIES AND TOOLS


As mentioned before; since we are going to use BCID, the product that we are going to deliver is going to work only on Windows operating system. This is because development and interface of Emotiv SDK is developed on Windows operating system therefore only usable on Windows. However we are going to use Emotiv SDK in an indirect way. Because the company that we are working with are developing a Java library while using this BCID. They are making things easier for us by providing some public methods. By using these methods we are not going to deal by receiving raw data and then do some exhaustive operations like Fourier transformations, data acquisition, signal enhancement, feature extraction and so on in order to have a meaningful data that we are going to use. Instead these methods will give us what we need to without dealing the internal details of them and the device.

Since we are going to be a group of four people, we are going to do different parts of the product. Therefore we are going to need a tool to integrate the parts that we developed individually to the

S o f t w a r e

D e s i g n

D e s c r i p 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

31

whole project and make sure that all group members are aware of the change that we made and maybe use it for some purpose. Having look at some tools we find a really nice tool named TortoiseSVN. This tool is a really easy to use revision control/ version control / source control software for Windows. It is based on subversion. TortoiseSVN provides a nice and easy user interface for subversion. It is developed under the GPL. Which means it is completely free, including the source code. Since it's not an integration for a specific IDE like Visual Studio, Eclipse, Netbeans or others, we are going to able to use it with whatever development tools we like. As a Subversion client, TortoiseSVN has all the features of Subversion itself, including: Most current CVS features. Directories, renames, and file meta-data are versioned. Commits are truly atomic. Branching and tagging are cheap (constant time) operations. Efficient handling of binary files.

Therefore using such a tool will help us a lot while developing integrating and while releasing the sub-versions of our product. We were thinking to use an object oriented programming language since we started this project. This object oriented programming candidates were C++ and Java. It is known that C++ is regarded as a "middle-level" language, as it comprises a combination of both high level and low level language features.1 However; Java is a general-purpose, concurrent, class-based, object-oriented language that is specifically designed to have as few implementation dependencies as possible and it is intended to let application developers "write once, run anywhere" and currently one of the most popular programming languages in use. Therefore the language that we decided to use is Java.2 Moreover since the library that will be provided to us by the company is going to be a Java library using Java will be more compatible. Since the project is a long term and complicated project we are going to need a user friendly and secure IDE. Looking at IDEs we find Eclipse more usable for us. Because Eclipse is a free, opensource, a very good GUI form editor, and easy to install Integrated Development Environment. Furthermore it gives immediate error messages; therefore you are able to fix the erroneous code before it causes bigger problems. It provides indentation, braces and renaming which we will need a lot during this project. Moreover it is easy to get all the tools and plug-ins that we will need, to develop our project with the Java platform.3 The final product will be used by people from almost all ages as we mentioned before. Therefore we need to have a very user friendly, nice looking, high-performance user interface. Therefore we decided to use SWT for this purpose. Because SWT is a graphical widget toolkit for use with the Java platform and it is high performance GUI toolkit; faster, more responsive and lighter on system resource usage than the other toolkit. Moreover SWT widgets have the same look and feel as native widgets because they often are the same native widgets.4

1 2 3 4

http://en.wikipedia.org/wiki/C%2B%2B http://en.wikipedia.org/wiki/Java_%28programming_language%29 http://en.wikipedia.org/wiki/Eclipse_%28software%29 http://en.wikipedia.org/wiki/Standard_Widget_Toolkit

S o f t w a r e

D e s i g n

D e s c r i p 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

32

In order to keep track of users; their names, passwords and history we need to have a database. For this purpose we decided to use MySQL. Because it is an open-source, more compatible than other databases, a very good performance, and a secure database. These are all what we need in terms of user history privacy, high performance while showing existing data and the user account security. Finally for the game that we are going to design we need a very attractive, entertaining, nice looking game. Because our product is going to be used by people from almost all ages, and people that suffer from lack of concentration. Therefore we have to have and keep their attention. Therefore we decided to use Adobe Flash for our game. Moreover Flash is pre-installed with Windows on corporate machines; therefore users dont need to install further things. Furthermore the main advantage of using Flash is that it's simply well-suited to the task of making games.5

9 TIME PLANNIG (Gannt Chart)


9.1 Term 1 Gannt Chart
The Gannt Chart of the first Term is the following Appendix.

9.2 Term 2 Gannt Chart


The Gannt Chart of the second Term is the following Appendix.

10 CONCLUSION
BCID is a new way of human and computer interaction. Most probably, in a decade, these devices will be used in many applications. Not only for medical applications but also the applications for casual users, they would become a major component. BCES project is based on this foresight. This project tries to discover new areas of BCID usage and combine them with the existing ones generating a compact daily life solution. Moreover, the modular game integrity system of the software leaves the door open to develop more concentration based games for the software in the future. That property will make the life time of the software become longer. Therefore, the BCES project is designed as a long term solution to make the neurofeedback technology a daily life concentration enhancement assistant of users.

http://www.flashmagazine.com/tutorials/detail/advantages_of_flash/

Vous aimerez peut-être aussi