Real-time control of a prosthetic device using EMG-based locomotion state classification computes a histogram [208] of a time-frequency spectrogram [206] of the EMG data [200] sampled from muscles, classifies the histogram using if-else rules [212] as representing a locomotion steady state [216] or locomotion transition state [214] in the prosthetic device, and controls the prosthetic device using the computed transitions between locomotion modes. The classification may be based on a comparison of feature values [210] derived from the histogram and stored feature values derived from histograms of known locomotion states. Alternatively, the classification may be based on matching scores calculated from the histogram and stored histograms of known locomotion states. The classifying preferably is performed using hierarchical if-else fuzzy classification rules [212], and may further include using a prior locomotion state and a state diagram specifying constraints on locomotion states accessible from other locomotion states.