Powered prosthetic devices can be driven using task-specific information from surface electromyogram (sEMG) signals recorded over the relevant muscles. The task-specific information can be extracted from sEMG signals using the state-space framework, which models movement planning and execution by the central nervous system (CNS). The proposed state-space model consists of a nonlinear system dynamics model and a linear measurement model based on the hypothesis of muscle synergies. The unknown system state, which is to be estimated, consists of synergy activation coefficients and is constrained to be non-negative on average due to physiological reasons. To solve this constrained nonlinear estimation problem, we propose a modification to the particle filter, which first draws particles from the unconstrained posterior distribution and then enforces the constraints by sampling from a high probability region. This method is termed MEan DEnsity Truncation (MEDET) in contrast to an approach that constrains the entire posterior density. The constrained state estimates, i.e., synergy activation coefficients are later used to discriminate between six different tasks including hand open, hand close, wrist flexion, wrist extension, forearm pronation and supination of three participants. The newly proposed PF-MEDET algorithm was able to discriminate hand tasks with more than 97% accuracy.