Automatic Noise Removal and Phase Synchronization for MI EEG Analysis