An Effective Brain-Computer Interface System Based on the Optimal Timeframe Selection of Brain Signals