  It is very well-known that the implementation of Model Predictive Controller
(MPC) on embedded platforms is challenging due to the computational
complexities associated while solving an optimization problem. Although, there
are many efficient embedded implementations existing by now, but for faster,
more dynamic and non-linear control applications, there is no cost-effective
and memory efficient embedded solutions. In this paper, we show the
implementation of embedded explicit MPC for a motor speed control application
on a lowcost 8 bit PIC 18 series microcontroller which costs only $5. The
offset-free explicit MPC is designed for reference tracking, constraints
handling, and disturbance rejection. The developed control law is exported to
low-level C code and utilized in HIL co-simulations. We present the results of
memory demand and control performance under various operating scenarios. The
presented results show that the developed embedded MPC utilize about 40% of RAM
and 92% of ROM for prediction horizon up to 3 samples. The performance of
developed MPC is compared with the conventional PI controller. Overall results
show that the presented approach is cost-effective, portable, and gives better
performance than the PI controller.
