By varying the duty cycle of the mosfet we can increase or decrease the DC input voltage by a factor of 1/(1-D)^2 (where D is the duty cycle). In the example we have set the duty cycle at 50% so with 10V at the input we expect that after the transients settle out to have 40V at the output.
If you want to change the duty cycle just change the
width of all voltage pulse sources (5% is 50% duty cycle and 10% is 100% duty cycle).