Dynamic analysis of EEG signals during spatial working memory used for either perception discrimination or planning of action,