This paper deals with the problem of stability analysis and controlling a power system in which a synchronous generator and renewable energy sources supply the power to an infinite bus. Firstly the investigation of the existence of the equilibrium points of the system and their stability is presented. For this problem, we derive a sufficient condition on the renewable energy current for the existence of the equilibrium points. In addition, we analyse the stability of the equilibrium points, and show that there is only one equilibrium points which is stable. These results clarify the impact of the penetration of renewable energy sources on the existence of the stable equilibrium points of the system. Secondly, the focus is made on elaborating an output feedback controller, combining a state observer and a nonlinear control law that stabilises the closed loop system whatever the current of renewable energy sources. Numerical simulations are given in order to show the effectiveness of all theoretical results.