In order to decrease the influence of system parameters and load on the dynamic performance of permanent magnet synchronous motor (PMSM) in cooperative robot joint modules, a practical model-based robust control method was proposed. It inherits the traditional proportional-integral-derivative (PID) control and robust control based on error and model-based control. We first set up the nominal controller using the dynamics model. In order to limit the influence of uncertainty on dynamic performance, a robust controller is established based on Lyapunov method. The control can be regarded as an improved PID control or a redesigned robust control. Compared with the traditional control method, it is simple to implement and has practical effects. It is proved by theoretical analysis that the controller can guarantee the uniform boundedness and uniform final boundedness of the system. In addition, the prototype of fast controller cSPACE is built on the experiment platform, which averts long-time programming and debugging. It offers immense convenience for practical operation. Finally, numerical simulation and real-time experiment results are presented. Based on cSPACE and a PMSM in the joint module of a practical cooperative robot, the availability of the control design and the achievable control performance are verified.