Analysis and enhancement of small signal stability of power systems affected by the penetration of renewable energy resources