Single trial detection of error-related potentials in brain–machine interfaces: a survey and comparison of methods