Biosignal-Based Human–Machine Interfaces for Assistance and Rehabilitation: A Survey