  In this study, we implement a control method for stabilizing a ballbot that
simultaneously follows a reference. A ballbot is a robot balancing on a
spherical wheel where the single point of contact with the ground makes it
omnidirectional and highly maneuverable but with inherent instability. After
introducing the scheduling parameters, we start the analysis by embedding the
nonlinear dynamic model derived from first principles to a linear
parameter-varying (LPV) formulation. Continuously, and as an extension of a
past study, we refine the parameters of the nonlinear model that enhance
significantly its accuracy. The crucial advantages of the LPV formulation are
that it consists of a nonlinear predictor that can be used in model predictive
control (MPC) by retaining the convexity of the quadratic optimization problem
with linear constraints and further evades computational burdens that appear in
other nonlinear MPC methods with only a slight loss in performance. The LPVMPC
control method can be solved efficiently as a quadratic program (QP) that
provides timing that supports real-time implementation. Finally, to illustrate
the method, we test the control designs on a two-set point 1D non-smooth
reference with sudden changes, to a 2D nonstationary smooth reference known as
Lissajous curves, and to a single-set point 1D non-smooth reference where for
this case theoretical guarantees such as stability and recursive feasibility
are provided.
