inverted pendulum controls and characterization of weightings