Machine learning-based modeling and control of underactuated balance robots