Analysis and Control of Underactuated Mechanical Systems