Lower centers of mass are more stable, but an inverted pendulum is inherently unstable; any perturbation will set it off.
The height to center of mass depends on how much track you have available, your reaction time, how you're measuring displacement/force, etc.
:EDIT:
To elaborate on my statement above, say you're estimating pendulum position by the reaction force on the carriage, where the force on the carriage is
$$F_{\mbox{reaction}} = (mg)L\sin{\theta}$$
Well, in that instance, if the reaction force is constant (say you're evaluating the minimum detectable force), then the angle associated with that force declines as the pendulum length $L$ increases.
Similarly, if you've got a rotary/angular encoder that has some minimum detectable angle, then the reaction force that puts on your carriage increases as the pendulum length increases.
In addition to the minimum detectable cases, consider the kinetic energy of the pendulum. This is an inverted pendulum, so the portion of the potential energy that is converted to kinetic energy is given by:
$$ \mbox{KE} = \mbox{PE}_{\mbox{initial}} - \mbox{PE}_{\mbox{final}} \\
\mbox{KE} = mgL - mgL\cos{\theta} \\
\mbox{KE} = (mg)*L(1-\cos{\theta}) \\
$$
(All of this assumes $\theta=0$ when the pendulum is vertical, by the way, just in case there's any confusion)
So, here again, for a constant $\theta$, the longer the pendulum length is the more kinetic energy the pendulum has. Assuming that you are again considering the minimum detectable case, this means that the longer the pendulum length is, the more kinetic energy the system has before you get a chance to respond.
So now, in addition to the fact that you're traversing more track ($\Delta x = L\sin{\theta} \approx L\theta$), the pendulum also has a higher starting kinetic energy, which means now you have to take a larger control action to damp the motion and return to steady state.
So, in summary:
- If you're measuring the angle of the pendulum directly, a shorter pendulum length would be preferred because it minimizes the kinetic energy of the pendulum by the time you detect motion.
- If you're estimating the angle of the pendulum by measuring reaction force on the carriage, a longer pendulum length would be preferred because this corresponds to a smaller angle, which in turn corresponds to lower initial kinetic energy.
I made a short spreadsheet to generate some plots to show the differences:
