Common Spatial Pattern Algorithm Design