There is a device that does this already. Its called an Alternator.

If you do not hook up the Alternator to a battery, its voltage will increase as RPM increases. So, a free floating, self-exciting alternator may be the answer.

I'm thinking, simple hook up the alternator to your gen and you're good to go.