0
\$\begingroup\$

I need to do a transient analysis of my BJT cascode amplifier. I was asked to use VPULSE as the source. I need to set VPULSE for +-10mV, 50% duty cycle square wave at 128 kHz with rise time and fall time of 10 ns. 

In PSPICE, I had set the VPULSE's attribute as

  V1=-0.01
  V2 = 0.01
  TR = 10ns
  TF = 10ns
  PW = 3.90625u
  PER = 7.8125u

The transient analysis setting is

 Print Step = 10ns
 Final time = 9us
 No print delay = 100ns

I would like to know how can I set my 50% duty cycle and is my analysis setting correct?

enter image description here

My simulation result shown above.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks. How can I set 50% of duty cycle? \$\endgroup\$
    – sterstar
    Oct 3 '18 at 14:28
  • \$\begingroup\$ You can't "set" it, you have to calculate all the values by hand. I converted my comment into an answer BTW. That plot is not the output of the vpulse source so not relevant here. Also, the error you made is very small, you cannot see that 10ns error you made in such a plot. Your duty cycle is 50.128% and that's so close to 50% that it is hard to see in a plot. \$\endgroup\$ Oct 3 '18 at 14:29
  • \$\begingroup\$ my bad. I had changed the picture \$\endgroup\$
    – sterstar
    Oct 3 '18 at 14:35
0
\$\begingroup\$

What I do:

128 kHz = 7.8125us so your PER is correct.

Then I make PW = PER/2 but subtract half of the the total of the transition times: TR + TF = 20 ns => half of that = 10 ns.

So PW = 3.90625 us - 10 ns = 3.89625 us.

So make PW = 3.89625u and then you would have 128 kHz with a perfect 50% duty cycle.

\$\endgroup\$
-1
\$\begingroup\$

Well, your pulse width is not quite right for a square wave, but it is close. If you want a square wave you have to account for the rise/fall times, so $$PW = \frac{\text{PER}}{2} - TR$$ assuming that \$TR\$ and \$TF\$ are equal, and where the variable names are the names used by SPICE (all caps, no subscripts).

Note that some simulators will require that you set the maximum timestep equal to the \$TF/TR\$ if you really want those rise/fall times.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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