Knowledge tip simulating and testing op-amp characteristics

Tip for relative beginners like myself, who specifically want to understand more about commonly used op-amp concepts such as noise, common mode, offset, etc. and want to simulate (LTSpice) and experiment with them. After a long search I found a suitable little book with a good explanation: "OP-Amps Circuits Simulations and Experiments" by Sid Antoch. For the chapters on filters and the like it is useful to pick up the basic concepts of complex arithmetic (brilliantly simple explanations in the excellent dsp_book_Ch30.pdf on analog.com) and the node voltage method.(khanacademy.org). Good LTSpice classes are easy to find on the Internet. More tips are very welcome.
 
  • Like
Reactions: 1 user
Member
Joined 2009
Paid Member
Tip for relative beginners like myself, who specifically want to understand more about commonly used op-amp concepts such as noise, common mode, offset, etc. and want to simulate (LTSpice) and experiment with them. After a long search I found a suitable little book with a good explanation: "OP-Amps Circuits Simulations and Experiments" by Sid Antoch. For the chapters on filters and the like it is useful to pick up the basic concepts of complex arithmetic (brilliantly simple explanations in the excellent dsp_book_Ch30.pdf on analog.com) and the node voltage method.(khanacademy.org). Good LTSpice classes are easy to find on the Internet. More tips are very welcome.
Hi thank you very much I have just bought a copy
May i ask which settings do you use when simulating opamps ?
I understand that settings can make or break the analysis ... and i am quite ignorant unfortunately
I am getting practically the same exact THD graph by different op-amps :oops: I really do not know how to proceed :cautious:
I am attaching an example
Thank you very much and good evening
gino
 

Attachments

  • LT 1028 line driver gain 2 times.asc
    1.7 KB · Views: 17
Hi Ginetto, your start with Fourier analysis is not the easiest one to choose. But Google is here too your friend, there is a wealth of information and videos that can help you. See for example the video FFT analysis basics and chapter 8 of the downloadable book analog design techniques.
I'm not a specialist either but if I can help you further you may send me a private message.
 
  • Thank You
Reactions: 1 user
In my experience, THD simulation of discrete circuits using good transistor models can give you comparatively useful results (i.e. this topology vs. that topology), but forget about predicting accurately the performance of the actual circuit, it's not unusual for simulated values to be one or two orders of magnitude lower than the actual measurements.

As for opamps, I've never even bothered. The models are usually too simplistic to account for the various distortion mechanisms of a real opamp (they're more about other things like transfer function, offsets, stability, etc.), so I'm not surprised you find negligible THD with most of them. If you want to know how real opamps perform in terms of THD, a very good source based on actual measurements is Samuel Groner's excellent paper on opamp distortion.

Cheers,
Cabirio
 
  • Like
  • Thank You
Reactions: 2 users
Agreed, but simulation may still be interesting for learning about design differences for audio. See, for example, small signal audio design by Douglas Self or when making overdrive guitar amplifiers. The point is that the input signal must be distortion-free in order to measure anything meaningful. In practical terms (equipment) this is very expensive, and in LTspice it is not self-evident. How to do this within LTspice is explained very well in the YouTube video.

By the way, I am very happy with your link to Groner's paper, very interesting and useful for me. Thanks again.

Regards,
Ben
 
Of course, I didn't mean to imply that opamp simulations are useless, I've done hundreds if not thousands of them... It's just that ginetto was trying to evaluate opamp distortion and, for that purpose in particular, simulation isn't very useful, given the way opamp models are built.

For many other purposes it can be extremely useful, but, as is always the case with LTSpice, it all comes down to how accurate / complex the model you're using is. I find the table in the Burr Brown application bulletin I linked above very useful to see what exactly each model can simulate, and some people have taken the time to tweak models to match reality much better than the stock ones, like fellow member Nazar Shtybel, see here.

Cheers,
Cabirio
 
  • Like
Reactions: 1 user
Member
Joined 2009
Paid Member
Hi Ginetto, your start with Fourier analysis is not the easiest one to choose. But Google is here too your friend, there is a wealth of information and videos that can help you. See for example the video FFT analysis basics and chapter 8 of the downloadable book analog design techniques.
I'm not a specialist either but if I can help you further you may send me a private message.
Hi ! thanks a lot for the very kind and valuable advice With the excellent support of Mr Mooly i have already used LTSpice to simulate some simple line stages and buffers of commercial units I tried with old Naim preamps and failed Very strange
On the basis of what i have done so far the choice of settings is fundamental to get a reliable result
With the setting i am using (that can be found in the attached file) almost all good quality opamps behave pretty much the same
The problem is that the results are not realistic (see attached fft)
at this point i am looking for some advice about best settings for opamps simulation
In the meanwhile i have already ordered the book recommended by you and thank you so much for the advice
i hope to understand something
I have come to reading about opamps after seeing how difficult is to get very low THD from discrete design .... a huge challenge indeed
And i am not fit for challenges at all Being quite ignorant
I have got a degree by copying and pasting information during examinations
 

Attachments

  • Screenshot 2024-05-25 201416.png
    Screenshot 2024-05-25 201416.png
    9.2 KB · Views: 11
Member
Joined 2009
Paid Member
In my experience, THD simulation of discrete circuits using good transistor models can give you comparatively useful results (i.e. this topology vs. that topology), but forget about predicting accurately the performance of the actual circuit, it's not unusual for simulated values to be one or two orders of magnitude lower than the actual measurements.
thanks a lot for the very precious advice Yes that was my impression But at least sim SW can say basic important information
like a circuit that cannot work ... the calculated working points and power dissipations ... the effect of changing parts and supply voltage values
in order to get a feeling about how reliable the results at sim can be i have started simulating commercial products of which i have read the lab measurements And yes i have founr the sim results too optimistic vs the real measurements In some case exagerately optimistic and even not realistic
As for opamps, I've never even bothered. The models are usually too simplistic to account for the various distortion mechanisms of a real opamp (they're more about other things like transfer function, offsets, stability, etc.), so I'm not surprised you find negligible THD with most of them. If you want to know how real opamps perform in terms of THD, a very good source based on actual measurements is Samuel Groner's excellent paper on opamp distortion.
Cheers,
Cabirio
thank you very much indeed for confirming a very fundamental point As i said above from what i read in the lab testing is very difficult to beat opamps with a discrete design In some cases almost impossible like the mythical ad797
more than understanding the theory i would like to find schematics already tested Therefore i think that a very reliable reference could be the dtatsheets and the application notes of various manufacturers I guess that the schematic they propose should work just fine
I am considering to purchase a qa403 audio analyzer It is a very powerfool tool to test the performance of the prototypes A good entry level to the measurements world A very fascinating one to me
 
Member
Joined 2009
Paid Member
Yes I meant epic
I think that there are always challenges and competition among designers
Fwiu the ad797 has set a record for lowest distortion?
I understand that below a certain level the differences can't be heard still is a remarkable tech achievement
 
Last edited:
I learned that there is a plethora of things that can go wrong with simulated THD measurements. Just to name a few:
You may get too bad results in case of too low resolution of the simulator, such as to too big timestep.
Or measuring too early before a steady state is reached, which may occur likrly with big coupling caps, for instance.
You may get too optimistic results in case your low THD relies on exact match of transistors or
specific compensation techniques to cancel non-linearities that rely on exact one set of transistor parameters ...
You have to fiddle with a lot of LTspice settings and I recommend to play with them to learn their effect on your results.
Furthermore in reality there maybe parasitic effects like ground loops etc that are not simulated at all.
Anyway, each simulation is only a gross approximation of reality, you have to learn the limitations.
 
Last edited:
  • Thank You
Reactions: 1 user
Member
Joined 2009
Paid Member
I learned that there is a plethora of things that can go wrong with simulated THD measurements. Just to name a few:
You may get too bad results in case of too low resolution of the simulator, such as to too big timestep.
Or measuring too early before a steady state is reached, which may occur likrly with big coupling caps, for instance.
You may get too optimistic results in case your low THD relies on exact match of transistors or
specific compensation techniques to cancel non-linearities that rely on exact one set of transistor parameters ...
Hi thank you very much for your very valuable advice
Personally i have been much more worried about too good results that cannot be true from a scientific point of view ... like HD down to -150dB etc.
Bad results for me are the norm ... i am used to those But when the SW puts out results that cannot be realistic ... then i get puzzled
You have to fiddle with a lot of LTspice settings and I recommend to play with them to learn their effect on your results.
completely true and a truly fundamental point. As soon as I downloaded the SW and saw a video on YouTube and I tried to simulate a simple circuit and make an fft. The graph that came out was pitiful especially from an aesthetic point of view
Then with the precious help of Mr Mooly who provided me appropriate settings, such beautiful curves came out that I fell in love with the SW.
If I could I would also simulate my washing machine to say
So i start to simulate some circuits taken from service manuals of commercial line stages and buffers of units lauded for their sound.
One thing i have noticed.
When there is voltage gain the HD usually goes bad also in commercial units. I cannot get 2n harmonic distortions lower than -100dB
Instead for buffers providing up to 2V into load of 5kohm i can go lower than that And so i am focusing buffers
For example, I saw the Tina SW. Only bars and not a complete curve. It doesn't attract me at all even if it were superior.
In fact, I would tell TI to pay more attention to the graphics and make the SW to throw out some nice curves. the eye also wants its part
However, it is now more than clear to me that settings are fundamental. But to choose the best ones you need to know what you are doing
I need to find a publication that explains what a timestep, resolution etc. is. etc.
Furthermore in reality there maybe parasitic effects like ground loops etc that are not simulated at all.
Anyway, each simulation is only a gross approximation of reality, you have to learn the limitations
There are limits this is now clear to me and thank you very much again.
But the question is ... how much popular are sim SWs among audio designers ? do they use them or not ?
That is the question.
 
A very nice and very understandable publication that explains all about time step, resolution Fourier, and other digital processing concepts is "Digital Signal Processing" of Steven W. Smith. Really a splendid teacher. Its not about simulation but about concepts of Signal processing you have to know to understand Signal processing by electronics and so simulations better. Download the book from dspguide.com, or better buy it also like I did for easy poking around.
For electronics with a minimum of math the "legendary :)" book The Art of Electronics may be very helpful I have found.
Ultimately you cannot avoid studying theory. To progress.
 
  • Thank You
Reactions: 1 user
Member
Joined 2009
Paid Member
Ultimately you cannot avoid studying theory. To progress.
:cry: thanks a lot ... there is where the brain limits come out In math at school i was like 6/10
with these intellectual limits I cannot allow myself many ambitions to understand the scientific basis
Ultimately, it would be enough for me to have settings that can be used in the simulations of various devices such as line preamplifiers and buffers, power amps, power supplies and in the future also passive filters for loudspeakers
 
To answer your last question: I like to use LTspice for very fast evaluation of analogue circuitry ideas.
I used it to design my personal latFET amp and played with it for about a month.
Then I designed the hardware using KiCAD.
Happily I can say the simulated outstanding performance simulated was close to the measured results.
But this was a long road of fiddling with LTSpice and the circuit design as well.
Another great advantage is you can explore circuitry and understand how things work.
The capability to measure currents in the femto-amp region and bandwidth far beyound audio lets you explore things you never dreamed of in reality.
 
  • Thank You
Reactions: 1 user
Member
Joined 2009
Paid Member
To answer your last question: I like to use LTspice for very fast evaluation of analogue circuitry ideas.
I used it to design my personal latFET amp and played with it for about a month.
Then I designed the hardware using KiCAD.
Happily I can say the simulated outstanding performance simulated was close to the measured results.
Well this is very important to me and give me the motivation to go on through the difficulties
But this was a long road of fiddling with LTSpice and the circuit design as well.
Another great advantage is you can explore circuitry and understand how things work.
this is exactly what i am looking for The nice thing about this sw is that immediately tells me if i am doing something wrong
And this of course is of fundamental importance Sometimes i change parts and values without even thinking And the waves resulting from the simulation have scaring shapes
When i get a sine wave i understand that in some ways the circuit is working Then i pass to the fft and see maybe a lot of harmonics
But for me it is important to know that the circuit can work Then starts the playing with values and parts
The capability to measure currents in the femto-amp region and bandwidth far beyound audio lets you explore things you never dreamed of in reality.
well this will be a next step ... maybe next year I am retired and have plenty of time ... at least is what i hope
I decided to stop buying ready to use units There is no pleasure in that Better to mod something or even build something from the scratch
About modding i remember of a designer who got better performance from a cd player taking out parts ! ok also he replaced some parts in critical points with better grade parts
Thank you very much again
gino