In this paper, from a nonlinear model for a pendulum on a cart system, which considers viscous friction, a two rules Takagi-Sugeno (T-S) fuzzy model is proposed using local approximation in fuzzy partition spaces approach. A Parallel Distributed Compensator (PDC), where feedback gains for the local linear controllers are obtained via Linear Matrix Inequalities (LMI) technique, guaranteeing global stability in the closed-loop system is also proposed. Moreover, a T-S fuzzy observer, using the separation principle from linear systems theory, is designed in order to estimate both cart and pendulum velocities. The so-called swing-up technique is used to swing the pendulum up from its pendant position to upright position. Numerical simulation and real-time experiments validate the effectiveness of our control scheme.