Skip to content

System requirement specifications

William Harvey edited this page Nov 26, 2020 · 6 revisions

💻 Web application

Functional requirements

  1. Home Page

    • The website home page should present a summary of the project as defined by the mockup.
  2. EEG Setup Guide

    • The user must have access to the following information:
      • The list of the necessary equipment.
      • How to apply the electrodes.
      • How to connect the electrodes to the acquisition board.
      • How to configure OpenBCI GUI to start recording.
      • How to remove the electrodes.
  3. EEG file upload page

    • The user must be able to select the CSV file from their computer.
    • The user must be able to enter their gender and age.
    • The user must be able to enter information from his sleep sequence log (and it must be validated):
      • Recording start time.
      • When he lay down (bedtime).
      • When he woke up.
    • The uploaded data file may be refused if it does not respect the expected format or if there is not enough data.
    • Validation should also be done between the file and bedtime / waking times. For example, a file should be refused if the wake-up time - bedtime > total recording time.
  4. Personalized analysis of a sleep sequence

    • Provide visualizations of user sleep data:

      • Evolving chart: This visualization is subdivided into 3 parts. This type of visualization is scrollytelling, where it is controlled by scrolling the mouse up and down.
        • In order to offer an alternative to the hypnograms conventionally used in polysomnography, we will use a Stacked Bar Char visualization compressed on a single line. Each bar marks the duration of each sleep through the sleep sequence and these stages are represented by different colors. The x-axis represents the time between going to bed and waking up.
        • Each sleep stage is represented by a color and the bars represent the duration of each of these stages. The five sleep stages are stacked in rows from top to bottom according to their sleep depth.
        • This bar chart encodes the time spent in each sleep stage during the sleep sequence. It shows the percentage of each of the sleep stages relative to the time after falling asleep until awakening. The only wake-up time present in this calculation is WASO.
      • Hypnogram: This visualization corresponds to a line chart representing the hypnogram of the sleep sequence.
      • Spectrogram: This visualization represents the spectrogram of the EEG signal used during the classification in order to have an intuition as to the characteristics of the signal in the different stages of sleep. This visualization should make it possible to highlight the places of the spectrogram corresponding to each sleep stage.
    • Metrics characterizing the sleep sequence uploaded must be offered to the user through the text presenting the data displayed. These include:

      • Bedtime / time to get out of bed and total time spent in bed.
      • Time to fall asleep / time to wake up.
      • Sleeping time until waking up.
      • Total time spent sleeping (actual sleep time, all sleep stages accumulated, excluding Wakes).
      • Sleep efficiency (actual sleep time / total time spent in bed).
      • Sleep latency.
      • WASO (Wake after sleep onset).
      • Number of awakenings during the sleep sequence.
      • The total time spent in each sleep stage.
      • Percentage of each sleep stage relative to time spent in bed.
      • Percentage of each sleep stage relative to time after falling asleep to awakening.
      • Number of stage transition.
      • REM latency.
    • Allow the user to download their data classified by the application's algorithm in a CSV format.

    • Allow a user to access data visualizations without having to upload a file. To do this, we have a pre-recorded sleep sequence of one of our members that serves as an example.

  5. Application performance

    • Provide the user with a visualization of the performance of the implemented classifier.
    • Offer the user a review of the methods for classifying sleep stages, based on the rate of agreement between electrophysiologists: "Sleep stage agreement averaged 82.6%. "[Rosenberg and Van Hout, 2013].
  6. Classification and data processing server

    • The automatic classification must be done on a python server and implement the supplied sklearn model.
    • This server must make it possible to retrieve the sleep metrics used in 1.1.4.2.
  7. Server download page

    • A server download page is displayed until the server is detected.
    • This download page should look like the one provided in the mockup.
    • The server must be available for linux, macOS and windows platforms and must be very easy to use.

📱 Mobile application

Functional requirements

  1. Import / Export of application data

    • Allow export of EEG data captured by the application and of sleep stages marked by the classification algorithm. We want to do this, because the user of the application might want to have access to the data that he acquired later, for example to process the data himself or to migrate the data from phones.
    • You can import previously exported data and add it to the history. This use case is useful when the user changes phones.
    • This feature is accessible from the sleep sequence history.
  2. Dashboard display

    • This feature is the home page of the app. It is also available from the application menu.
    • Shows sleep metrics for historical sequences (assuming all sequences are from the same person). The metrics are as follows
      • The actual sleep time of the last acquired sleep sequence.
      • Last sleep latency.
      • Efficiency of the last acquired sleep sequence.
      • The average effective sleep time of the sequences that make up the history.
      • Average sleep latency of the sequences that make up the history
      • Average efficiency of the sleep sequences that make up the history.
      • Graph of the evolution of efficiency over time (from the sleep sequences that make up the history).
  3. Viewing the details of a sequence

    • Provide metrics on the quality of a sleep sequence:
      • Bedtime / time to get out of bed and total time spent in bed.
      • Time to fall asleep / time to wake up.
      • Sleeping time until waking up.
      • Total time spent sleeping (actual sleep time, all sleep stages accumulated, excluding Wakes).
      • Sleep efficiency (actual sleep time / total time spent in bed).
      • Sleep latency.
      • WASO (Wake after sleep onset).
      • Number of awakenings during the sleep sequence.
      • The total time spent in each stage of sleep.
      • Percentage of each stage of sleep relative to time spent in bed.
      • Percentage of each stage of sleep relative to time after falling asleep to awakening.
      • Number of stage transition.
      • REM latency.
  • Provide data visualizations, in order to explain to the user his sleep sequence: * Hypnogram: Line chart of sleep stages through the sequence * Proportion of sleep stages: bar chart showing the percentage of each sleep stage relative to the time after falling asleep until waking up.
    • Indicate the acquisition card that was used to record the EEG data.
    • Display the date and time of the start of acquisition and end of acquisition.
    • Tooltips explain terms such as WASO and sleep latency.
    • User can delete sleep sequence.
  1. Sleep sequence history

    • It is possible to select a sequence in the history in order to see its details or to delete it.
    • It is summarized on each item of history the time of the start of the acquisition, the total time of the recording (which corresponds to the time spent in bed) and the sleep efficiency.
  2. Consult the EEG assembly installation guide

    • A guide to installing and uninstalling the EEG setup will be available in the application menu.
    • This guide will include the following:
      • The list of necessary equipment
      • How to apply the electrodes
      • How to connect the electrodes to the acquisition board
    • The uninstallation guide is separate from the last one. This includes the following parts:
      • How to safely remove the electrodes
      • How to clean the electrodes
  3. Acquire a sleep sequence

    • When the user wishes to proceed with the recording of a sequence, the application presents the user with the setup guide. An option to skip the guide must be available.
    • The user is prompted to connect the acquisition card to the phone, then presented with feedback on the signal quality for each electrode channel before proceeding.
    • The user will be able to start the data acquisition using a start button. After the acquisition begins, the application will wish the user good night. The user must first be told that when they press the button, it should be when they turn off the lights and go to bed.
    • During the sleep sequence, the signal quality is continuously displayed for each electrode. The time since the start of recording is also displayed.
    • A button is used to declare that the recording sequence is finished (the user declares that he is awake for good). This button must have a confirmation mechanism. After confirmation, the application will wish the user good morning.
    • At the end of the recording, the application presents the user with the timeline uninstallation guide. This can always be skipped with a button. Subsequently, the user is taken to the sleep sequence detail page.
  4. Parameters

    • The first time the application is opened, the user will be able to choose which acquisition board they will use. This choice will be saved and can be changed in the application settings.

    • When opening the application for the first time, the user will have to enter their date of birth and gender. This choice will be saved and can also be changed in the application settings. It will be necessary to indicate to the user that this data is only used by the classification algorithm, since age and sex are characteristics which help to discriminate the stages of sleep from one another.

Non-Functional requirements

  1. Acquisition board interface

    • The application must allow easy connection with OpenBCI acquisition boards (Cyton and Ganglion) (automatic board configuration).
  2. Application Deployment

    • The application must be deployed on the Play Store.
  3. Classification of sleep EEG data

    • The application must allow classification of sleep according to AASM standards. The sleep stage classification model provided must be integrated directly into the application. In case of incompatibility, a cloud solution can be considered. Data processing and classification should take a reasonable amount of time (max. 15 sec.)
  4. Maintenance costs

    • The application will be offered free of charge and the costs associated with its maintenance must therefore be minimal.
  5. Ethics

    • For ethical and privacy reasons, the data will be stored and processed locally in the event of integration of the model into the application. Otherwise, the processing can be done online, but a warning must be provided to the user certifying that no data will be kept.
  6. Power consumption

    • In order to ensure the proper functioning of the application, a check of the device's charge will be made before the start of data acquisition. A warning will be issued if the load is deemed too low.
  7. Use of mobile data

    • The application must make little use of the user's mobile data.
  8. Optional elements

    • An estimate of the classification is displayed in real time during data capture.
    • Implementation of the application on iOS.
    • Application deployment on the App Store.
    • The user can specify whether the sleep sequence is a nap or a full night.
    • If there is a problem with the signal from the electrodes, the application should send a notification to the user.
Clone this wiki locally