I want to make a circuit that changes voltages with the duty cycle as well as doubles that for me. I therefore made a voltage doubler circuit along with alternating PWM wave. But as I changed the duty cycle my voltage at the output didn't change. I don’t know what's the error as I have seen in the buck converter that with a capacitor in the path of the PWM, as the duty cycle changes the voltage changes. Using the concept of buck converter and voltage doubler I made the following circuit but this circuit isn't working accordingly.
Can anyone help me to make a circuit for this use? Also, what is the error in this?
I used the load such that my RC time is less than the time of charge and discharge so that my capacitor voltage drops with the alternating PWM. But nothing helped at all. When I used a small value of capacitor/resistor to decrease the RC time my wave became rippled and I failed to get DC voltage and still I was not able to achieve my result of changing PWM to give changing voltage.
Kindly help and give some formulas to get the desired capacitor for 25kHz so that I get a proper DC voltage and also a PWM-based voltage.