Automatic voltage regultor of generator

So you did some work! Why didn't you tell so right away? Now you're getting somewhere.

Arduinos (the regular ones - Uno, Micro, Mega, etc) can not produce a variable DC voltage by themselves. You can produce a PWM signal using analogWrite() function. Feed that to a low pass filter and you can produce a variable DC voltage. Depending on your generator's input impedance you may have to buffer this through a unity gain OpAmp circuit.

Finally, the best way of controlling the output based on the input is probably through a PID function, there are PID libraries out there to make this easy for you.