Human locomotion recognition methods based on electromyography (EMG) signals have not shown robust and accurate classification performance. This is due to the limitations of EMG signals such as its stochastic nature and sensitivity to placement of the sensors, as well as the number of sensors, feature extraction and classification algorithms. In this paper, a robust classification approach with only two features derived from EMG signals is developed to recognize locomotion activities and detect changing speeds. The root means square (RMS) and energy of the EMG signals are the features adopted in this method. The energy of the EMG signal is extracted using energy kernel method. The proposed approach uses a low number of sensors and features, online unsupervised classification, and is generalizable to different lower-limb muscle groups. To evaluate the benefits of the proposed approach, it is initially tested on a public dataset of five participants with two EMG sensors on biceps femoris and gastrocnemius, doing separate trials on the treadmill at various speeds and slopes. We performed additional experiments on two participants with EMG sensors on vastus laterialis and vastus medialis, as treadmill speeds changed online within each trial. The proposed approach achieved significant classification accuracy (above 90%) using the standard unsupervised K-means clustering, for both locomotion activity and speed recognition with the public dataset and our collected data.