This paper deals with the problem of obtaining stable and robust oscillations of underactuated mechanical systems. It is concerned with the Hopf bifurcation analysis of a Controlled Inertia Wheel Inverted Pendulum (C-IWIP). Firstly, the stabilization was achieved with a control law based on the Interconnection, Damping, Assignment Passive Based Control method (IDA-PBC). Interestingly, the considered closed loop system exhibits both supercritical and subcritical Hopf bifurcation for certain gains of the control law. Secondly, we used the center manifold theorem and the normal form technique to study the stability and instability of limit cycles emerging from the Hopf bifurcation. Finally, numerical simulations were conducted to validate the analytical results in order to prove that with IDA-PBC we can control not only the unstable equilibrium but also some trajectories such us limit cycles.