Abstract: This paper presents the modeling and control of a nonlinear two-wheeled inverted pendulum (TWIP) system. We derive the transfer function and design robust controllers for the TWIP system.