A robust nonlinear controller based on an improved feedback linearization technique with state observer in presence of uncertainties and external disturbances is developed for a class of nonlinear systems. First, by combining classical feedback linearization approach with a robust control term and a fuzzy logic system, we design and study an efficient controller for such systems. Second, we propose an optimized extended Kalman filter for the observation of the states. The parameters to be optimized are the covariance matrices Q and G, which play an important role in the extended Kalman filter performances. This optimization is insured by the particle swarm optimization algorithm. The Lyapunov synthesis approach is used to prove the stability of the whole control loop. The proposed approach is simulated on a nonlinear inverted-pendulum system. Simulation results demonstrate the robustness and effectiveness of the proposed scheme and exhibit a more superior performance than its conventional counterpart.