enter image description here

I wanted to simulate a pulse transformer in LTspice. It steps up the input 12 -12 pulses to 120V -145 pulses means it has some dc offset. How to correct it?

  • 1
    \$\begingroup\$ Let it run for a couple of cycles more. \$\endgroup\$
    – PlasmaHH
    May 10, 2017 at 19:24
  • \$\begingroup\$ Add a sniff of series resistance, then let it run for a couple of cycles more. \$\endgroup\$
    – Neil_UK
    May 10, 2017 at 19:30
  • 2
    \$\begingroup\$ I see no DC offset. What I see are asymmetric peak values that are due to the fact that the duty cycle is not 50%. \$\endgroup\$
    – Dave Tweed
    May 10, 2017 at 20:15
  • \$\begingroup\$ Yup! Dave has nailed it. You need to look at Webers (volt-seconds.) These will be balanced. \$\endgroup\$
    – jonk
    May 10, 2017 at 20:17
  • \$\begingroup\$ Yeah, its definitely the pulse rise\fall time, make it symmetrical \$\endgroup\$
    – Voltage Spike
    May 10, 2017 at 22:10

1 Answer 1


The problem with using LTSpice's pulse waveform is that if you don't specify the rise and fall times, I think it uses \$\frac{1}{20}\$th of the cycle time, for each of the rise and fall times. It also accepts your cycle time and your ON time, literally. So the off time will be what's left over.

The best thing to do with LTSpice here is to specify everything accurately. In your case, try:

Vinitial: -12
Von:       12
Tdelay:    0
Trise:     100n
Tfall:     100n
Ton:       {1/50k-200n}
Tperiod:   {1/25k}

That should make it very close to symmetrical, I think.

Note that I've subtracted the rise and fall times from the ON time.

Suppose you want to leave the frequency open as a parameter. Then you can add a spice line to your schematic that says:

.param F=25k RISE=0.001 FALL=0.001

And then do the following:

Vinitial: -12
Von:       12
Tdelay:    0
Trise:     {RISE/F}
Tfall:     {FALL/F}
Ton:       {(0.5-RISE-FALL)/F}
Tperiod:   {1.0/F}

Or something like that. (The RISE and FALL values, as shown, are just the proportion of the total time you want to use.)


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.