Simulating Power Bandwidth

I'm trying to do a simulation to show power bandwidth for a (high power) OpAmp versus compensation capacitor.

In the lab I would simply crank up the signal generator amplitude until the output became triangular rather than sinusoidal.

Collect all the data for peak amplitudes versus frequency and then plot.

Any ideas how I might do that automatically in a simulator, generating a family of curves that looks like this...

(I have performance Analysis in PSpice Probe available; or LTspice, if it can do such a thing.) ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
 Click to see the full signature
Reply to
Jim Thompson
Loading thread data ...

I'm trying to do a simulation to show power bandwidth for a (high power) OpAmp versus compensation capacitor.

In the lab I would simply crank up the signal generator amplitude until the output became triangular rather than sinusoidal.

Collect all the data for peak amplitudes versus frequency and then plot.

Any ideas how I might do that automatically in a simulator, generating a family of curves that looks like this...

(I have performance Analysis in PSpice Probe available; or LTspice, if it can do such a thing.) ...Jim Thompson

Are you after the Fundamental, or after 'individual' harmonics' energy? The fundamental limit is not a 'hard' limit, is it? So you must have some rule to determine 'when' you reach the max.

Does not matter, you can manipulate the data anyway you want, plot ?? = (fundamental Energy)/(total output signal Energy). Do anything you want.

If so, do that all the time, will put together a package and send to you.

remember how I combined .tran and .noise to create .tranoise analysis? After using .tranoise analyses, I can also REMOVE all signal tones to find the residual noise floor. You'd be surprised how the noise floor is a function of signal, distortion, etc.

Reply to
RobertMacy

Did you get an answer for this question?

Just checked on a LT1028 powered with +/- 12Vdc as a simple inverter 1k,

1k resistors into a 2k 2.2pF load driven into slew rate limit with 7Vpk 1MHz. with 2.2pF, 10pF bypass caps. Not sure I trust the results because the way the LTspice 'bobbles' the bias around due to the large current surges at crossovers.

Interestingly, I get 'close' to the FFT in LT's plot, but several things just aren't right when you purposely 'abuse' a component like that.

What amp you trying to step the cap with? what circuitry?

Reply to
RobertMacy

Can't talk ;-)

I've given up (for the moment) and I'll leave it to the lab guys to generate the data.

The official definition is the max peak-to-peak SINE wave that can be handled.

(In my particular case, I have a similar bias "bobbling" issue which blows self-peak-sampling... I had that working at the low end, but it goes haywire at a few hundred kHz.) ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
 Click to see the full signature
Reply to
Jim Thompson

understand.

handled before what?

The 'bobbling' is exacerbated at crossovers. I just ran the LT1028 with 7 Vpk at 1MHz and found some WILD current transients at crossovers from both supplies. All the 'bobbling' stopped when I forced the step size small enough to not have the error estimations, etc. interact with the approximation processes in the solver.

For example, for 1MHz I had to go to maximum steps of 2nS !!! That's right. Larger steps, caused a 'walking' in the output that injected an immense amount of noise below 1MHz.

PS: Thanks to you I used your tanh trick to 'smoothly' initiate the drive into the LT1028 else even the startup transient took a long time to recover from.

I used the drive of 7.07 sin( 2 pi 1MHz t), but I multiplied it times a ramp up that took about 100microseconds to get the sine wave up, still caused significant spiking just before where I started taking data.

again, take the sine wave time a scaled (tanh(k*time-5) + 1)/2 gives a nice clean 0 ramp quickly up to 1 within the first 100microseconds

then use .tran 0 1.1m 0.1m 2nS to throw away all that transient stuff to get clean fft's and all went extremely well.

Reply to
RobertMacy

No longer sinusoidal.... it's a leftist-level definition >:-}

I _love_ TANH ;-) ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
 Click to see the full signature
Reply to
Jim Thompson

I don't get "bobbling" in my simulations. Did you neglect to change the integration method from TRAP to GEAR? :)

Tim

--
Seven Transistor Labs 
Electrical Engineering Consultation 
 Click to see the full signature
Reply to
Tim Williams

Took half hour but I finally got it. [passing hand over forehead, saying whoosh]

Reply to
RobertMacy

Neglect?! spit! sputter! what the heck is that?! Again, and as usual, can't find any reference in the manual.

Thanks, found it as .options method=gear or something like that, but no explanation of the impact of selecting that non-default value.

Will try it. Has to make it faster than forcing the step size to be 50 times smaller.

Exactly where is a good description for all these options?

Reply to
RobertMacy

...continue to bite your tongue? yeah, good idea. Did you notice the significance in your point got lost in the typos and gramatical errors. Perhaps, try again and elaborate a bit, and of course, epithets deleted, they didn't add much.

Reply to
RobertMacy

If that don't work, you could also try the crank and at last resort then block and tackle method. I am sure there must be some hidden hacks like that somewhere in the software switches.

Jamie

Reply to
Maynard A. Philbrook Jr.

doesn't make much difference. if the maximum step size is not set well, the output voltage 'bobbles' pretty much the same whether TRAP or GEAR

only thing that stops the bobbling is to make the max step size 1/100th of what you'd normally 'like' to set it at.

Reply to
RobertMacy

"Speed kills"... in a simulator you can trade accuracy for speed. I tend to use a max timestep equal to 1/(32*Fmax).

"Patience is a virtue" >:-} ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
 Click to see the full signature
Reply to
Jim Thompson

I don't know what Mike Engelhardt did inside that LTspice but it is a 'screamer'! for example, using the built-in models with graphics is usually ten times faster than using the same models, but spelling them out, in a *.cir old style entry.

Mike said the noise modeling inside ALL the Linear OpAmps in the LTspice library are accurate! Which appeared to be true on the ones I checked. Even had the 1/f contributions in there! Only downside is the noise values are 'typical' ;)

Reply to
RobertMacy

You must have missed the "Do not feed the trolls" sign? ;)

Reply to
RobertMacy

Every once in a while they make me want to swat them like flies. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
 Click to see the full signature
Reply to
Jim Thompson

...Let alone how to use them?

Stuff like GEAR is well documented by most SPICE descriptions, and computational solvers in general; it's their word for Runge-Kutta of order MAXORD. Note that TRAP (trapezoidal, i.e. Newton's Method, more or less) is essentially RK1.

I very rarely use TRAP in my simulations because the settling is poor and erratic (the result is a distinctive alternation, every other timestep, of a given variable about its ideal value -- it looks like triangles when zoomed), particularly for nonlinear (switching) circuits. Occasionally, I find RK4 (GEAR, MAXORD = 4) beneficial: the average timestep is calculated much more slowly (more derivatives to compute), but the worst-cases are much better -- it's not digging as deep (constantly redoing a bad calculation at progressively smaller timesteps) or as often, around strongly nonlinear events (such as switching edges), so the overall simulation can run faster (and more stable -- less likely to get stuck on a randomly too-small timestep).

I don't believe I've ever seen GEAR2 produce "bobbling" results; either it settles asyptotically, or the oscillation is really there (as evidenced by finding a smooth sinusoidal oscillation after setting smaller RELTOL and/or max. timestep to enhance detail).

As for "how to use", judging by the dearth of instructions or even useful documentation on most SPICE settings, I can only assume three things:

  1. Don't touch that, you'll screw it up! Use the default settings! If it starts throwing errors, the circuit /must/ be impossible!
  2. Play with all of them and see what works. Life is a journey, or something.
  3. I know what works, but I'm not going to tell you.

Against the apparent collective wisdom of all three, I dare suggest these, which seem to work well enough (these are in Multisim, which is your basic XSPICE backend):

formatting link
formatting link
formatting link
but not all are available in LTSpice, so YMMV.

The most obscure setting of them all seems to be pivot (PIVREL, PIVTOL). It's purely a computational thing, and of the few references I can find to it, the only sentiment is "does nothing, leave it alone". Yet I've had more than a few failing circuits fixed by setting a more strict (larger) value, like as shown. I dare someone to explain that.

Tim

--
Seven Transistor Labs 
Electrical Engineering Consultation 
 Click to see the full signature
Reply to
Tim Williams

LOL!

I purchased from MicroSim their PSpice manual. It's in storage and I have no access. But I do remember excellent explanations for what is going on. to the point of being able to make a great deal of decent models.

Thanks for the great suggestions, will try them.

Sadly, while at University I seemd to have missed three important areas: Maxwell's equations, which I need to use constantly; noise, although took some great courses at Stanford from Robert Geray and T. Kailath, which now live and breathe noise everyday; and numerical analysis, which was best described by moving hand over forehead loudly declaring 'whoosh' and now every day fight battles with simple things like truncation errors, convergence issues, and accumulation truncation errors, ad nauseum.

And now, the 'nuances' of spice kernel. sigh.[if that was even the correct word]

Reply to
RobertMacy

For even more information, consult books on numerical methods, especially numerical solution of differential equations.

Also books on linear algebra, especially numerical methods.

They are most likely talking about pivoting, which is done in the solution of linear equations by gaussian elimination. Spice solves a linear equation at each time step.

If these are really absolute and relative tolerances (as the names would suggest), I doubt that larger values are more strict. Making these tolerances larger makes the algorithm less fussy.

Anyway, it's a long story, but the system matrixes that describe circuitry are quite nonlinear (all those semiconductors!) and are often ill-conditioned (and thus very sensitive to tiny errors). A lot of this is in Nagel's PhD thesis, the founding document of SPICE, although SPICE has evolved considerably since then.

..

Joe Gwinn

Reply to
Joe Gwinn

Well, now you're not doing yourself any favors. Windows comes with tens of thousands of drivers, and only costs a hundred bucks! (c;

Tim

--
Seven Transistor Labs 
Electrical Engineering Consultation 
 Click to see the full signature
Reply to
Tim Williams

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.