BCI Projects

From ESE497 Wiki
Revision as of 20:08, 3 July 2012 by Ed (talk | contribs)
Jump to navigationJump to search
  • Project3: BCI Offline Analysis - Signal Detection
    • Plot R^2 for all Channels/Frequency Pairs
    • Analyzing BCI2000 dat Files
    • Start with OfflineAnalysisSpectral.m. This is the file you will modify for this project.
      • Open in Matlab. Click on File-Set Path and "Add with subfolders" the Tools folder from the BCI2000 folder
      • Click the Run arrow. Select eeg1_1.dat, eeg1_2.dat and eeg1_3.dat. Click Open
    • Remove the DC (average) for all 64 channels
   for ch=1:size(signal, 2)
       signal(:, ch)=signal(:, ch)-mean(signal(:, ch));
   end
    • Implement CAR Spatial Filtering using the BCI2000 funtion carFile
   signal = carFilt(signal,2) ;
    • For every channel compute the power spectrum for every segment of 80 samples every 40 samples for both condition==0 and condition==2 and average them. Create two 3D array of PowerSpectra of size(NumFrequencies,NumChannels,NumTrials) for both conditions.
    • Compute the R^2 function for all Channel/Frequency pairs
    • Plot the R^2 values for all Channel/Frequency pairs using the BCI2000 function calc_rsqu. It should look similar but not identical to the graph on the tutorial.
    • Useful Matlab Functions:
      • find
      • spectrogram
      • surf
        • After calling surf, you should execute the following line to eliminate those pesky yellow lines
   set(gcf,'Renderer','Zbuffer')
  • Project4: BCI Offline Analysis - Signal Classification
    • Combine best Channel/Frequency pairs using eeg1_(1,2,3).dat (use lda.m)
    • Collect your own data using the Emotiv Headset
    • Combine best Channel/Frequency pairs using your own data
      • states.StimulusCode values for stimulus presentation
        • 0: Gray Screen - Relax, blink, move around, etc.
        • 1: Left - Clench left hand
        • 2: Pause - Unclench
        • 3: Right - Clench right hand
    • Plot the power in the 4 best Channel/Frequency pairs for the action and the rest conditions using the eeg1 data vs. trial
    • Plot the action and rest results of the LDA vs. trial
    • Plot the ROC for the 4 best Channel/Frequency pairs and the LDA
    • Results
    • Useful Matlab Functions:
      • subplot
      • save, load
      • squeeze
  • Project 5: Move sbRIO robots based on BCI algorithm using EEG1 data
    • Re-Package your Matlab code into 2 functions that
      • 1) Read the trials from the .dat files and return 1 trial every time it is called.
      • 2) Computes the LDA measure from the current trial.
    • Test these new functions in a for loop in Matlab and make sure you LDA results match the results from before
    • Call your matlab functions from inside BCI.vi and move the robots every time the action is detected. Verify that you get the number of errors you expected and that the LDA calculation matches from before.
  • Project 6: Implement in real-time with Emotive headset