Design and Implementation of Model Predictive Control Algorithms for Permanent Magnet Synchronous Machines on FPGA-based Control Boards