The cart-inverted pendulum is a non-minimum phase system having right half s-plane pole and zero in close vicinity to each other. Linear time invariant (LTI) classical controllers cannot achieve satisfactory loop robustness for such systems. Therefore, in the present work the fractional order PI λ D μ (FOPID) controller is addressed for robust stabilization of the system, since fractional order controller design allows more degrees of freedom compared to its integer order counterparts by virtue of its two parameters λ and μ. The controller parameters are tuned by three evolutionary optimization techniques. In order to select the controller parameters optimally, a novel non-linear fitness function using integral time square error (ITSE), settling-time, and rise time is proposed here. The control algorithm is implemented successfully in real-time. Moreover, stability analysis of the system compensated with a fractional order controller is presented using Riemann surface. Robustness of the physical cartinverted pendulum system towards multiplicative gain variations and plant parameter variations is verified. In this regard, it is shown that the fractional order controller provides satisfactory robust performance in both simulation and real-time system. KEYWORDS cart-inverted pendulum system, FOPID controller, gain margin (GM), non-minimum phase system, Riemann surface, robust stability