For a electric circuits lab I had to implement a dc-dc boost converter circuit and take certain measurements while I varied the duty cycle of the pulse applied to the MOSFET so that I could observe the relationship between the output voltage and the duty cycle. Unfortunately, I forgot to measure input current \$i_{in}\$ show in the schematic below

enter image description here

where L = 455 uH, C = 18.92 uF, and R_L = 0.98137 kOhms. The voltage source v_in is constant 5V dc while the PWM voltage to the MOSFET is a 5V max, 0V min, 100 kHz, square wave with duty cycles varying between 10-90%.

So now I'm simulating the circuit in LTspice so I can retrieve at least the theoretical current values at different duty cycles.

Here's the reconstruction of the circuit:

enter image description here

This is the voltage I get across the load:

enter image description here

This behavior concerns me because it looks nothing like the signal I saw on the oscilloscope in the lab AND when I vary the duty cycle of the PWM signal, the voltage across the load doesn't change. The experimental behavior, and the behavior I'm trying to re-create with the simulation, is:

Duty  Voltage
(%)   (V)
10    6.273
20    8.2296
30    10.884
40    13.03
50    14.55
60    15.3
70    15.898
80    23
90    37

How can I fix my simulation to mimic the actual behavior I observed?

  • 1
    \$\begingroup\$ Look up '3 terminal PWM switch model' on your search engine of choice. It abstracts out the MOSFET, PWM and diode into a single block and allows you to just focus on the dynamics of the converter. You can find these for LTspice if you look around (check Christophe Basso's webpage). \$\endgroup\$ Commented Apr 28, 2016 at 3:04
  • \$\begingroup\$ Something is wrong with the diode. Your voltage is input minus 0.7, which seems like implications of simplest diode model. Or actually, it looks that diode is fine, but the switch doesn't open. Maybe the MOSFET is too slow. Check the current on mosfet. I bet it's not close to inductor current. \$\endgroup\$
    – user76844
    Commented Apr 28, 2016 at 4:25
  • 3
    \$\begingroup\$ I have had strange results sometimes with the default MOSFET model from LTSpice. I don't know its characteristics, but I think they are unusual. Right-click on it and select a real part (one that would be appropriate for you), it might change your results. Same for the diode. Choose a real one. \$\endgroup\$
    – dim
    Commented Apr 28, 2016 at 7:24
  • \$\begingroup\$ In my LTSpice at least an IRF510 is in the library use that also you may be able to find a spice model for a 1N4007 but if you cant pick a diode from the library with a similar specification. You will not get exactly the same results with different parts than your original experiment but the more similar parts you pick the more similar your results should be. Also are you sure you were only applying 5V pulses? The IRF510 is not a logic level MOSFET so I'm guessing they were somewhere around 10 or 12 volts. \$\endgroup\$ Commented Apr 28, 2016 at 14:00

2 Answers 2


How can I fix my simulation to mimic the actual behavior I observed?

At 5v, with quality diode and MOSFET, with zero losses in the inductor, PWM, and capacitor, I cannot reach your stated voltage of 14.55v at 50% duty cycle. So possibly the volts were higher, the load was less, or some other measurement or parasitic is not accounted for. Click for full-size:

Buck Simulation

To get this simulating near real-world values, I did the following:

  • Set "Start External DC Supply Voltage at 0v" in transient options.
  • Replaced M1 with a real model (right-click, "Pick New MOSFET".)
  • Same with D1.
  • Increased simulation to 50mS to see the settling value.

The first and second item had the most influence. "Start at 0v" because this more accurately reflects powering on the circuit from 0v. Without this, it calculates an initial steady-state DC solution, then starts simulating. And the default "NMOS" model is a very generic one, and wasn't working properly for this application. Replacing that with a power device made a large difference.


That behavior is normal. With a simple converter like this, there will be some finite measure of ripple. Check out the actual change in voltage in the waveform you attached, it varies from about 4.30655 to 4.30663V; .00008V or 80uV.

Your oscilloscope probably was not zoomed in enough to see this change. At such a small level the intrinsic parasitics of the wires and nearby metals might even filter such a low level signal even further before the oscilloscope.

In regards to the voltage not changing, I would try building the circuit in the built in circuit module (circuit lab). It can simulate the behavior. Just guessing, maybe the frequency of the PWN needs to be changed.

The MOSFET has a resistance unlike an ideal switch, so it does take more time for the inductor to charge than you may expect.

You could also try decreasing the size of the capacitor. This will increase the ripple (which is already very small, so being even 10x-100x larger is probably fine, remember small ripple approximation?) but also allow the output voltage to rise easier, since Q=CV, V=Q/C, so the smaller the cap the less charge per change in output voltage.

  • 1
    \$\begingroup\$ I have been burned many times by this in LTspice. The signal looks crazy and weird from what is supposed to happen, but then I realize that one of the scales is usually really zoomed in. \$\endgroup\$
    – Addison
    Commented Apr 28, 2016 at 3:25
  • \$\begingroup\$ The graph I attached is using a 50% duty cycle. When I was in the lab, I observed a 14.55V output at 50% duty cycle, not a 4.3V one. How do I reconcile this? \$\endgroup\$
    – user104243
    Commented Apr 28, 2016 at 3:28
  • \$\begingroup\$ I added some stuff to my answer in regards to the output voltage not varying enough. \$\endgroup\$
    – jbord39
    Commented Apr 28, 2016 at 3:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.