Your three topics on the same or similar subject have been merged.
Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.
Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.
Repeated duplicate posting could result in a temporary or permanent ban from the forum.
Could you take a few moments to Learn How To Use The Forum
It will help you get the best out of the forum in the future.
25 kHz: tweak the registers of the Arduino and you can get 25 kHz PWM signal. See ATmega328 datasheet for details. Use a MOSFET gate driver IC to aid its switching (there are numerous options, see e.g. digikey.com and pick one that suits your needs).
30V out: add a 30V zener to the output to limit the voltage, in parallel to the 68µF C, or you easily get >40V (at which point the 1N5819 will leak so much that it limits the output voltage - replace it with a 1N4148 and your output voltage easily goes >100V).
Lessen the load; 50Ω at 30V is 600 mA. This circuit can no way produce anything near that. I'm expecting around 10 mA tops.
Maximum reverse voltage for the 1N5818 is 30V so you're really pushing it using it in this way (especially without any form of voltage limiting on the output). OP's 1N5159 is a better choice (40V reverse voltage rating), though my preferred choice would be the 1N4148.