TPC vs TMC vs 'pure Cherry'

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
If you
  • use my Blameless4.asc from #173
  • change C3/5 back to your 100p/330p
  • remove U1 the THD meter
  • connect V2 to InP
  • edit the SPICE directive to just say
.param prb=0
.tran 0 11m 0m 1u

you'll find oscillation on only some of the negative peaks.

This type of instability may come & go in 'real life'. It often doesn't show up in 'linear' stability measures like PM, GM, Bode, Nyquist etc.


Actually, if you decrease the maximum time-step to, for example, 0.1us you'll see oscillations in every cycle. So this is not an instability that occurs from time to time (which, in a SPICE simulation, would be something really odd to get).

The fact that this cannot be detected with "linear stability measures" puzzles me considerably.... I'll take a look at this in more detail in the next few days....

Regards
 
In my simulation I've had some oscillation only on the verge of clipping, and when I simulated as you suggested I had oscillation on some negative peaks. This should not be provoked by non adequate TMC but somewhere else. By increasing C4(parallel to the Vbe multiplier) from 1nF to 0.1uF oscillation disappeared and remained some clipping oscillation(on positipe peaks). With lower VAS degeneration(R22) from 22 ohm to 15 ohm or even 10 ohm all oscillation desappeared.
Thanks for this Damir.

This is now the best of all the TMC versions and only 6dB from the #173 'pure Cherry' version's THD at 20kHz. I expect 'Little Gem' to have excellent performance with a simple circuit and I have commented on this before.

The Closed Loop response still shows some peaking. Damir2CL.gif is with a pure 1n8 cap. load but the peaking is still there with just 8R. You may want to do some work to reduce this.
____________________

I think this illustrates that 'pure Cherry', still the winner by a small margin, is no more difficult to get stable as other compensation methods. It's just the processes, thinking and experience are not as well known.

I have certainly learnt a lot ... about how to do evil TMC etc :D
_____________________

The fact that this cannot be detected with "linear stability measures" puzzles me considerably.
I didn't say it 'cannot be detected with linear stability measures'. I said it 'often doesn't show up.'

The 'linear' .AC methods use hfe, ft, Ccb at only one operating point; usually the quiescent value. But BJT hfe, ft, Ccb and other stuff vary ALOT with operating conditions. Compare the changes in these parameters with current and Vce for any modern BJT output. In a Power Amp, these conditions vary a lot too.

.TRANS doesn't use a single value but whatever value is appropriate at each step. I find it remarkable that it can simulate loadsa real life stuff .. eg the oscillation that happens only on part of a cycle.

The linear .AC methods can only hint that something might go wrong. eg if PM, GM, Nyquist are borderline, any change to hfe, ft, Ccb bla bla might push things into oscillation. But it may be that such changes makes things more stable instead of unstable.

.TRANS tells you the 'whole' story.
 

Attachments

  • Damir2THD.gif
    Damir2THD.gif
    31.3 KB · Views: 197
  • Damir2-20k.gif
    Damir2-20k.gif
    29.2 KB · Views: 191
  • Damir2CL.gif
    Damir2CL.gif
    25.8 KB · Views: 188
Thanks for this Damir.


I didn't say it 'cannot be detected with linear stability measures'. I said it 'often doesn't show up.'

The 'linear' .AC methods use hfe, ft, Ccb at only one operating point; usually the quiescent value. But BJT hfe, ft, Ccb and other stuff vary ALOT with operating conditions. Compare the changes in these parameters with current and Vce for any modern BJT output. In a Power Amp, these conditions vary a lot too.

.TRANS doesn't use a single value but whatever value is appropriate at each step. I find it remarkable that it can simulate loadsa real life stuff .. eg the oscillation that happens only on part of a cycle.

The linear .AC methods can only hint that something might go wrong. eg if PM, GM, Nyquist are borderline, any change to hfe, ft, Ccb bla bla might push things into oscillation. But it may be that such changes makes things more stable instead of unstable.

.TRANS tells you the 'whole' story.


Yes, but that’s the reason why you must run several AC analysis with the amplifier at different operating conditions (i.e. no only at quiescent conditions).

I’ve done this for your example in two conditions: maximum output voltage (where there is no oscillation visible in the transient analysis), and at the point where oscillations are visible.
In the max output voltage case the phase margin is ~58º, but the gain and phase characteristics do not look good near the unit gain frequency (UGF). In the later case there is a peak in the gain characteristic after the UGF, which causes the gain to rise above 0dB in a range of frequencies where the phase is already below -180ºC -> in this situation phase margin in -36º, which is why you have oscillations.

The presence of oscillations can always be detected with a properly done AC analysis.

Regards

PS: I’ve done this in HSPICE, which is a simulator I have access to. It allows making an AC analysis at any point of the transient analysis. I think LTspice cannot do that (not sure), but it should be straightforward to make a testbench that forces these conditions for the AC analysis.
 
Let me just add something I forgot in the previous post, regarding the phrase “.TRAN tells you the whole story”. The thing is, it may not tell you the whole story!

As you know, oscillations in a (negative) feedback system arise when there is a phase shift larger than 180º at frequencies where the loop gain is still >1. In practice this means that, for a certain range of frequencies (those where phase shift is larger than 180º AND loop gain is >1) the system is actually making a positive feedback – hence the oscillations.

A naive guy could think that the oscillations would not build up as long as the input signal does not fall in that range of frequencies. And he would be correct … if there was no noise. What happens is that the noise components in that range of frequencies are amplified, causing the oscillations.
This is a relevant point, because in standard transient simulations there is no noise (except for “numerical noise” from the computations), and so a transient simulation may “miss” the oscillations (*). And if you do see them, it is due to the “numerical noise” of the simulator – but this is highly depend on simulator options (**).

As mentioned in my previous post, I simulated your example with HSPICE and initially saw no oscillations - simulator missed them. I then made a transient simulation with noise (it does that) and … there they were! So the conclusion is .TRAN tells you the whole story if you’re making a simulation with noise (which LTSPICE doesn’t). So you can only be sure if you do a number of AC analyses, in different operating conditions (which apparently most people don’t do).

This, along with the facts that some transistors are poorly modeled and people ignore a bunch of parasitic effects (ex: inductances on the terminals of the transistors) is, I suspect, the reason why in practice amplifiers have oscillations that where not found in simulations.

Regards


(*) - This is why when you simulate an oscillator unless you do something (e.g. inject a small current pulse somewhere), it may not start oscillating

(**) –For example, with the time step you had the oscillations were only visible from time to time, but reducing it made the oscillations appear at every cycle, as I mentioned previously.
 
Last edited:
certainly use fine t_maxstep size - 10x steps per period of the frequency range you expect to model - modern PCs are very powerful - I often use single digit ns step size

Pease has a good stability testing blurb - can do the same in Spice even if he despised it - Vin steps, Iload steps (direct in Spice) or through pulsed Vsource and series Z

we can .step param of compensation components, loads too over a range of values
 
... “.TRAN tells you the whole story”. The thing is, it may not tell you the whole story!

As you know, oscillations in a (negative) feedback system arise when there is a phase shift larger than 180º at frequencies where the loop gain is still >1. In practice this means that, for a certain range of frequencies (those where phase shift is larger than 180º AND loop gain is >1) the system is actually making a positive feedback – hence the oscillations.
[pedantic]The strict condition is that Nyquist encircles (-1,0). Phase can be 180 and Loop Gain a zillion and .. as long as this happens very far from (-1,0) it doesn't matter.[*] There are several simulation results I've posted on this thread where this happens. eg #84/85.[/pedantic]
As mentioned in my previous post, I simulated your example with HSPICE and initially saw no oscillations - simulator missed them. I then made a transient simulation with noise (it does that) and … there they were! So the conclusion is .TRAN tells you the whole story if you’re making a simulation with noise (which LTSPICE doesn’t). So you can only be sure if you do a number of AC analyses, in different operating conditions (which apparently most people don’t do).
For example, with the time step you had the oscillations were only visible from time to time, but reducing it made the oscillations appear at every cycle, as I mentioned previously.
Errh! LTspice didn't miss them. HSPICE may have. Damir didn't look at his LTspice results closely enough. :eek:

I think I'm entitled to claim LTspice .TRANS DOES tell the 'whole story' as it reveals the problem. Dat's why we do dis sims ... even if this isn't pedantically true. [more deleted pedantic rant about something ... but no one can remember what... ] But this SPICE newbie thanks you for your tip about reducing time_step. :)


[*][even more pedantry ..]The strict condition counts how many times (-1,0) is encircled. Google Nyquist curve. This is of interest to control specialists but for us unwashed electricians ... usually only one encirclement is of interest with Power Amps :) [/pedantry]
 
Last edited:
Dear kgrlee,

My purpose was to help clarifying a few aspects of what people usually call "parasitic oscillations", by checking an interesting example (your's). But it seems you are convinced you know it all...

I would just like to make a couple of comments to your last post:

Nyquist Criteria: Google Nyquist curve? You make me laugh. Surely you don't think you're the only one that knows what it is, right?

" LTspice .TRANS DOES tell the 'whole story' as it reveals the problem": Well, in this case it did, but as I said (and shown) this is highly dependent on simulator parameters. Keep trusting SPICE simulators without understanding their limitations, and you may end up trying to figure out what is causing parasitic oscillations in the amplifier you just built...

Good luck
 
My purpose was to help clarifying a few aspects of what people usually call "parasitic oscillations", by checking an interesting example (your's). But it seems you are convinced you know it all...
But I don't know it all. I'm a SPICE newbie. I'm trying to get my crude simulations to reflect what I've seen in 'real life'.

Nyquist Criteria: Google Nyquist curve? You make me laugh. Surely you don't think you're the only one that knows what it is, right?
Just picking you up on your
.. oscillations in a (negative) feedback system arise when there is a phase shift larger than 180º at frequencies where the loop gain is still >1.
As you are obviously a Nyquist guru, you'll know this isn't strictly true. I DID say I was being pedantic. And you can check my quoted examples for this :D

Keep trusting SPICE simulators without understanding their limitations, and you may end up trying to figure out what is causing parasitic oscillations in the amplifier you just built...
I have spent ALOT of time dealing with 'parasitic' and other oscillations in amplifiers. I wrote my own 'linear' circuit analysis programme in the early 80's to help me with this & other stuff. I'm very careful about sims and are always suspicious that they may not reflect 'real life'. I have to say that I'm VERY impressed by LTspice and how it simulates loadsa 'real life' stuff that I've personally found.

I try not to pontificate or recommend anything unless I've at least vaguely tried it in 'real life'.

Well, in this case it did, but as I said (and shown) this is highly dependent on simulator parameters.
Please post an example where your HSPICE shows a problem that LTspice .TRANS doesn't also show.

As I said, da ONLY reason we do dis sims is cos they may have some relevance to real life. Once there is a hint of oscillation, we know that further work is required. We take the same action .. if the oscillation appeared on a few cycles or all cycles.

But I'm grateful for your recommendations on how to improve SPICE accuracy. More Guru recommendations please :)
 
I've looked at your sim shots and it appears you let the "THD analyzer" set up the simulation parameters for you. While you have been getting reasonable results with this, you should be aware that an important part of the simulation parameters are hidden from you when you do this. There are some helpful parameters to increase accuracy, integration method and so on. I have a really fat list of parameters I paste onto each schematic I want to test exhaustively. Most of it involves some automation so I'm not wasting my mouse and cartilage clicking on all those things.

This may be moot to you because I've never used the "THD analyzer" and have always done things with the FFT function. I am also somewhat distrustful of it because it uses discrete notch filters and there are some errors associated with this (maybe I'm wrong).

Attached is an amp simulation "template rig" thing I made to help new LTSpice users. I would prefer to incorporate my own THD analyzer to this if possible. The ability to plot individual harmonics with frequency and power is very nice.

I would appreciate suggestions on what can be improved. This rig is designed to prevent operating point errors. It took me YEARS to figure out how to create a square source that was balanced AND resulted in a correct DC operating solution with no drift to ruin the FFT. The Sine Burst option allows testing of dynamic behavior as well as CCIR distortion test, but it also reduces the operating point jolt a circuit experiences with a sudden sine wave source in simulation and this also improves the FFT noise floor. Sine Burst voltage is doubled because the average amplitude is half of the max, and more accurately reflects what the THD results will show.

I think I will eventually add a triangle wave source which can be done, but must be done carefully for the same reason that the square wave source in LTSpice is an UTTER FAILURE when it comes to testing amps with square waves at the correct operating point.

I thought about adding a parasitic layer to this rig, but parasitics are highly variable so it's questionable to do something for the user when only the user has the information necessary to elaborate the actual parasitics of the setup.

By turning on both square and sine sources at once, you can do a dynamic stability test where the square wave is riding the sine. If you plot "slew rate" or D(Vfb), minute flaws in the square response at each operating point will be magnified and you'll go MAD to make the amplifier consistently stable as well as performing well. This test has really opened my eyes to dynamic step response errors.
 

Attachments

  • ampsim4.asc
    5.5 KB · Views: 78
One thing that helps with stability suspicions is to put a behavioral voltage source on the schematic with V={.5/timestep}. This works with my rig. If you hover the probe over the output of this voltage source, LTSpice will display the minimum Nyquist frequency limit of the simulation at the bottom. LTSpice raises the sampling frequency automatically to prevent simulation errors, but unless you force the frequency to a specific minimum value with the plotwinsize and timestep parameters, the error will show up as RF loss in your circuit which can prevent an unstable circuit from actually acting unstable in transient analysis.

I would have designed the rig so that the Nyquist frequency is selected directly, but for a clear FFT (and hence the .four parameter working right) the simulation needs the total number of samples to be a power of 2, and a continuous timestep control makes this extremely unlikely.
 
THD Analyzer

While you have been getting reasonable results with this, you should be aware that an important part of the simulation parameters are hidden from you when you do this. There are some helpful parameters to increase accuracy, integration method and so on. .... I've never used the "THD analyzer" and have always done things with the FFT function. I am also somewhat distrustful of it because it uses discrete notch filters and there are some errors associated with this (maybe I'm wrong).
Kean, I'm flattered that you consider me a LTspice guru. :D But I only started playing with it this year .. to see if it could simulate some stuff I used to see in 'real life' Jurassic times when the design of amps was of real importance to me. I have been a real beach bum for nearly 1.5 decades.

The code for the THD Analyzer and all the parameters are in 'Analyzer_Controlls.txt'. I won't pretend to understand it all .. but it appears to do THD by rms sum of harmonics from the FFT.

The notch is done by removing the fundamental from the FFT and then IFT. There appears to be a 'settling time' which affects the residual of the first few 'frequencies' but by the time we get to 20kHz, the notch output appears exactly as we expect. The THD sum appears always good.

This is of course the sensible way to do THD in da 21st century.

jcx might like to comment as I believe he had something to do with the code.

My own poor efforts at THD by FFT have been inconsistent. I can't get a consistent FFT noise floor. :mad: When I do, the results coincide with THD Analyzer.
___________________
Attached is an amp simulation "template rig" thing I made to help new LTSpice users. I would prefer to incorporate my own THD analyzer to this if possible. The ability to plot individual harmonics with frequency and power is very nice.

... It took me YEARS to figure out how to create a square source that was balanced AND resulted in a correct DC operating solution with no drift to ruin the FFT. ... CCIR distortion test, but it also reduces the operating point jolt a circuit experiences with a sudden sine wave source in simulation and this also improves the FFT noise floor
Thanks for this Kean. I was going to ask for both this and the CCIR test on the LTspice Yahoo forum. :)

By turning on both square and sine sources at once, you can do a dynamic stability test where the square wave is riding the sine. If you plot "slew rate" or D(Vfb), minute flaws in the square response at each operating point will be magnified and you'll go MAD to make the amplifier consistently stable as well as performing well. This test has really opened my eyes to dynamic step response errors.
I'm really a speaker & mike man so believe I have a pretty good idea of what comes out in 'real life' ... SACD and other sh*t notwithstanding.

I have conducted Double Blind Listening Tests to Lipsh*tz & Vanderkooy standards bla bla on Bandwidth Limitation and was pleased to find 21st century efforts ALL came up with exactly the same results as my Jurassic tests. ALL those who can reliably tell the difference between an unlimited bandwidth signal and a 20kHz brick wall PREFERRED the bandlimited signal.

So nothing's really changed since Olson's experiment_that_saved_high_fidelity.html ie Even today, the state of the art is such that extended bandwidth only lets more crud in. :eek:

But I have just as much interest in zillion V/us as the next guy :D An easy way to see hard or soft slew limiting is to plot V(inp)-V(inn) ie the voltage across the LTP inputs.

All this mumbo jumbo is just to say I think the important issues are
  • how the amplifier overloads
  • how it recovers
  • this applies to slew as well as normal overload
  • judicious bandwidth limitation is essential
 
Last edited:
I agree that BW filters on an amp don't seem to affect the sound much. However I've found the compensation scheme appears to have a large effect on the sound, so I treat it very seriously.

I actually have a prototype in simulation that gets up to 1kV/uS, and -140db THD. It's sort of like a zooped up Slone design. The trick is that it's BW is limited (without requiring an input filter), so there's no way it can slew limit within it's input voltage range, so to see the highest slew rate you have to set the square to max. The input stage simply doesn't respond to high-frequency signals so it is relatively bulletproof against RFI at the input.

To do the CCIR test, set Freq to 20KHz, numcyc to 10 and Burstrate to 5. It is not straightforward but I designed the Burst option to be flexible.
 
... -140db THD. ... The trick is that it's BW is limited (without requiring an input filter), so there's no way it can slew limit within it's input voltage range, so to see the highest slew rate you have to set the square to max.
This has been my Holy Grail since before 1980. I'll be happy with -120dB THD @ 20kHz :) I gave up, like Sir Lancelot, when I realised I was not worthy to see the Grail .. :)

All my subsequent designs have had passive BW limiting. :D

Are you going to publish? Pretty please?

To do the CCIR test, set Freq to 20KHz, numcyc to 10 and Burstrate to 5. It is not straightforward but I designed the Burst option to be flexible.
Thanks for this Kean.
 
The design hasn't been built and tested, although it shows similar promise to the last 5 simulations that worked in real life. I want to finish it and fully illuminate it before putting it on display. I still have much to do in simulation before I am comfortable building a prototype.
 
[pedantic]The strict condition is that Nyquist encircles (-1,0). Phase can be 180 and Loop Gain a zillion and .. as long as this happens very far from (-1,0) it doesn't matter.[*] There are several simulation results I've posted on this thread where this happens. eg #84/85.[/pedantic]

[*][even more pedantry ..]The strict condition counts how many times (-1,0) is encircled. Google Nyquist curve. This is of interest to control specialists but for us unwashed electricians ... usually only one encirclement is of interest with Power Amps :) [/pedantry]



Just picking you up on your As you are obviously a Nyquist guru, you'll know this isn't strictly true. I DID say I was being pedantic. And you can check my quoted examples for this :D

I said that I know what it is, not that I'm a guru.

Yes, it is possible to have a stable negative feedback system where the Open Loop Gain >1 when phase =180 degrees. But that happens in "exotic" situations which typically do not occur the design of amplifiers. For example if the amplifier has a non-monotonic phase response passing through 180º several times in such a way that, in the Nyquist plot, point (-1,0) is encircled the same number of times clockwise and counter-clockwise. Or, for example, if point (-1,0) is encircled once but the open-loop response of the amplifier+feedback network has a pole in the righ-half plane (which, you surely agree, would be something unbelievably idiot to try.)

An indication that these are "exotic" situations is that if you check books on electronic design (for example from Sedra/Smith, Razavi, or Gray/Meyer) some them mention simplified versions of the Nyquist criteria, but all conclude that one must ensure the loop gain must be <1 when phase=180º.
Given that we are in an Audio forum -> check Self and Cordell books, they have lots of practical experience, and their books don't say you need Nyquist plots. Finally, for what it's worth, in my ~15 years of doing analog design of integrate circuits I've never encountered any such "exotic" situations.

Note that for the sake of robustness even in a "well behaved" amplifier you must ensure a decent phase margin (PM). For example in a two pole system a PM=45º still has some ringing in the step response, and it takes a PM near 75º get rid on overshoot.


Now going to the case we were discussing: I believe what I said is actually strictly true, given that AC simulations show phase decreases monotonically. This means that point (-1,0) is encircled, at most, just once. If that encirclement exists, then according Nyquist criteria the closed loop response is unstable (unless the open-loop response of the amplifier has poles in the right-half plane...)


I have spent ALOT of time dealing with 'parasitic' and other oscillations in amplifiers. I wrote my own 'linear' circuit analysis programme in the early 80's to help me with this & other stuff. I'm very careful about sims and are always suspicious that they may not reflect 'real life'. I have to say that I'm VERY impressed by LTspice and how it simulates loadsa 'real life' stuff that I've personally found.

I try not to pontificate or recommend anything unless I've at least vaguely tried it in 'real life'.

Please post an example where your HSPICE shows a problem that LTspice .TRANS doesn't also show.

As I said, da ONLY reason we do dis sims is cos they may have some relevance to real life. Once there is a hint of oscillation, we know that further work is required. We take the same action .. if the oscillation appeared on a few cycles or all cycles.

But I'm grateful for your recommendations on how to improve SPICE accuracy. More Guru recommendations please :)

All SPICE simulators are evolutions of the original simulator developed in Berkeley in the 70's, and there are a number of limitations they ALL share.

My point was that oscillations arise in an unstable amplifier because noise is regeneratively amplified. And since a traditional SPICE simulation has no noise other than the "numerical noise", getting oscillations with an input sinewave is a mater of luck, that is highly dependent on the simulator parameters. This has nothing to do with simulator A being better than simulator B.

You asked an example, let me give you 2:
1. Run the simulation of the amplifier (your own example) with 0.1u maximum time step -> oscillations are there, in every cycle. (I'm running the simulation up to 11ms)
Now go to Tools-Control Panel-SPICE and change RELTOL to 0.008 -> oscillations are gone...
Change RELTOL to 0.007 -> oscillations are visible only once, around 45us.
Now change time step to 1us (the value you had initially) -> you have to decrease RELTOL to 0.004 to see oscillations (this time near 1.09ms).
Now change the "Default Integration Method" to "Gear" (this choice is not innocent:cool:) . You'll not get oscillations even with RELTOL=1e-6
So, as I said, highly dependent on simulator parameters....
2. Open the LTSPICE example colpits.asc (under LTSpice\examples\Educational). As the name indicates, this is a Colpits oscillator.
Run the simulation and look at drain voltage of Q1 - circuit oscillates, as it is supposed to.
Now edit the simulation settings and unselect "Start DC supply voltage at 0V" (this prevents V1 from being "ramped-up" at the beginning of the simulation), and run the simulation -> it no longer oscillates. LTSPICE just missed oscillations in an oscillator !.

I hope these two examples helped clarifying what I meant.

Finally, there's something you haven't commented:

Yes, but that’s the reason why you must run several AC analysis with the amplifier at different operating conditions (i.e. no only at quiescent conditions).

In my opinion this is fundamental, as it allows to see what is happening to the frequency response and stability margins when the amplifier is in different conditions.

Regards
 
Yes, it is possible to have a stable negative feedback system where the Open Loop Gain >1 when phase =180 degrees. But that happens in "exotic" situations which typically do not occur the design of amplifiers.
In my post #84 http://www.diyaudio.com/forums/solid-state/235188-tpc-vs-tmc-vs-pure-cherry-9.html#post3480607[/QUOTE]I show examples of where phase =180 and LG>1; both stable & unstable versions.

These LG plots are NOT exotic but common to many 'modern' amp designs where there are 3 or more devices in the forward path of a loop. They are also characteristic of TPC.

The multiple encirclements beloved of control theory textbooks however, are far rarer in power amps. Most 'problem' amps have a Nyquist which approach from 180, doing a dance across the line. But as the approach is always from the same direction, no encirclements take place. It's only when Nyquist nears (-1,0) that encirclements may take place.

For example if the amplifier has a non-monotonic phase response passing through 180º several times in such a way that, in the Nyquist plot, point (-1,0) is encircled the same number of times clockwise and counter-clockwise.
I invite you to post a sensible or even a stupid Power Amp .ASC with multiple encirclements.

Given that we are in an Audio forum -> check Self and Cordell books, they have lots of practical experience, and their books don't say you need Nyquist plots.
I'm only claiming that for us newbies, looking at Nyquist might help us become experts like Self, Cordell & your good self :)

I don't think we are disagreeing on this subject. Please excuse this SPICE newby for trying to sound important :eek:
____________________
You asked an example, let me give you 2:
1. Run the simulation of the amplifier (your own example) with 0.1u maximum time step -> oscillations are there, in every cycle. (I'm running the simulation up to 11ms)
Now go to Tools-Control Panel-SPICE and change RELTOL to 0.008 -> oscillations are gone...
Change RELTOL to 0.007 -> oscillations are visible only once, around 45us.
Now change time step to 1us (the value you had initially) -> you have to decrease RELTOL to 0.004 to see oscillations (this time near 1.09ms).
Now change the "Default Integration Method" to "Gear" (this choice is not innocent:cool:) . You'll not get oscillations even with RELTOL=1e-6
So, as I said, highly dependent on simulator parameters....

... loadsa important stuff ....

Run the simulation and look at drain voltage of Q1 - circuit oscillates, as it is supposed to.
Now edit the simulation settings and unselect "Start DC supply voltage at 0V" (this prevents V1 from being "ramped-up" at the beginning of the simulation), and run the simulation -> it no longer oscillates. LTSPICE just missed oscillations in an oscillator !.
Which model would you like me to run this on? I've posted about 4 of my own designs and several of other people's on this thread. My own designs don't oscillate. :D

I'm aware of SPICE behaviour on oscillators and in fact (pseudo? :eek:) pontificated on the subject on another forum.
________________
pfigueiredo said:
Finally, there's something you haven't commented:

... that’s the reason why you must run several AC analysis with the amplifier at different operating conditions (i.e. no only at quiescent conditions).
This SPICE newby's very HO, is that doing .TRANS at various signal levels and with various loads will pick up the 'real life' implications of this behaviour. It is one of the most impressive features of LTspice.

If you have an example where your 'several AC analysis at different operating conditions' picks up a problem in a Power Amp that isn't also shown by .TRANS, please post it here.
 
I disagree that there is "no need" for Nyquist plots. Designers must choose the method that makes sense to them. It is the process of learning. We are not robots. Yes there are multiple ways to assess anything. The responsible engineer chooses tools to suit his talents. I find once I really understand the tools I'm using, I'm able to use any tool I want.

That said, I would really like LTSpice to make a POLAR Nyquist plot, with logarithmic magnitude. Then you could actually see all the loops without wearing out your mouse and cartilage with the zoom button.

You can add noise to LTSpice. You use a behavioral voltage source with the Noise function.

The "integration method" AFAIK affects behavior near the simulation BW limit. Gear is the most accurate algorithm. Using an inferior algorithm may speed up simulation and due to less noise/loss, will provide the energy to expose spurious oscillations. However because this happens at the BW limit the behavior is highly dependent on simulator timestep. A better approach would be to use accurate algorithms and add your own noise sources to the rails, input and output. Then you are not subverting the simulator to do something that it already has a dedicated feature for.
 
kgrlee and bystanders, here's my last ampsim rig with added noise source. I will be experimenting with this myself, so we can all share observations. If you want to add the noise source to another part of the schematic you can copypaste it. I have noise set to 10uV, since that's the noise level of my 10uV diff amp plugin for my Tek scope.

The idea is that an added noise source will excite parasitic resonances so we can have accurate simulation as well as accurate indication of oscillation.

The noise can be turned off of course, when you don't need it and it may slow simulation.
 

Attachments

  • ampsim5b.asc
    6.5 KB · Views: 61
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.