Analysis and design of extremum seeking controllers