The development of biped machines, inspired by human locomotion, is an interesting subject in engineering science. In order to understand the principles involved in biped locomotion,researchers have proposed several mathematicalframeworks. All these models have provided technical knowledge of biped locomotion that has been applied in the development of many energy efficient biped machines. However, the construction of biped machines capable of exploiting passive dynamics in different gaits remains an unsolved engineering challenge. In this study we propose a controller of the angle of attack that exploits the passive dynamics of a compliant leg to develop stable patterns of locomotion and gait transitions in a defined range of energy. We adopt the spring loaded inverted pendulum (SLIP) model to represent running and walking. The controller naturally emerges from the identification of stable regions of locomotion as well as unstable regions.