  This article presents the real-time implementation of the model predictive
control for tracking formulation to control a two-wheeled inverted pendulum
robot. This formulation offers several advantages over standard MPC
formulations at the expense of the addition of a small number of decision
variables, which complicates the inner structure of the matrices of the
optimization problem. We implement a sparse solver, based on an extension of
the alternating direction method of multipliers, in the system's embedded
hardware. The results indicate that the solver is suitable for controlling a
real system with sample times in the range of milliseconds using current,
readily-available hardware.
