construction and simulation of automatic voltage regulator for generator