I remembered a similar situation, someone needed variable "0-10V".
Grumpy Mike came up with a circuit for just that, using Arduino PWM.
See his attachment, "Prop SSR.pdf" --
It worked for jimjam, and it ought to work for you, too.
Nevermind the SSR part. The variable voltage is at the Emitter of the NPN.