• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Project: Spice Simulation of Power-Amps with real loads

sepp2gl

Member
Joined
Sep 19, 2020
Messages
31
Likes
5
Location
Germany
Hi audiomaniacs,
as mentioned in my intro, this thread is about long-lasting back-brain audio-project.
It surrounds the topic "Current-Drive for Loudspeaker (I-Drive vs. V-Drive).
I intend to simulate characteristic params like THD, IMD, Step-Response, Bursts, etc. using tools like Matlab and Spice.
All this with modelled real loudspeaker loads.
Linear loudspeaker models are available and already producing reasonable results.
Currently I am working on analysing scripts and algorithms.

The benchmark shall include <10 linear amplifiers, represented by available schematics in gEda, KiCad or Eagle, to support netlist creation for Spice-simulations.
My current portfolio are from Elektor (Crescendo, Kleine Qualitaetsendstufe, Hexfet) and Rieder Ampino.

The simulations will be restricted to the linear travel of the loudspeaker-cone. Extended nonlinear simulation can start later.

My startup questions:
1. As I don't want to re-invent the wheel: are there already any contribution along this topic within or outside this forum or is this a entirely new question?
2. What would be your proposal for amps to be included as candidates for benchmarking (Pls. note: I need their schematics & BOM to take part)
3. What is your recommendation for metrics to be analysed in addition to m.a. characteristics?

looking forward to your feedback
kr, sepp2gl
 

pma

Major Contributor
Joined
Feb 23, 2019
Messages
4,591
Likes
10,728
Location
Prague
I did something on speaker distortion under voltage vs. current drive, with results posted at my webpage
http://pmacura.cz/speaker_dist.htm

and also here at ASR
https://www.audiosciencereview.com/...-under-voltage-drive-and-current-drive.10369/

Regarding speaker distortion with sine bursts I posted a thread here
https://www.audiosciencereview.com/...istortion-of-speakers-with-sine-bursts.11794/

However, I am not sure if you will find much audience here. IME, people at the forum are more interested in general and more simple and "popular" issues.
 
Last edited:
OP
sepp2gl

sepp2gl

Member
Joined
Sep 19, 2020
Messages
31
Likes
5
Location
Germany
Hello Pavel,
thank you for the link to your website.
Very interesting, partly surprising results.
It explains, why some people use I-Drive for tweeter-amps, whereas I thought it would be especially advantage for woofers.

Are your results measured or simulated results?
Which toolchain did you use for the tests?
Did you do any scientific publications about it?

kr, sepp2gl
 
OP
sepp2gl

sepp2gl

Member
Joined
Sep 19, 2020
Messages
31
Likes
5
Location
Germany
P.S.: I am used to audience, that is not interested in scientific work.
Instead they prefer exchanging "opinions", which often ends up in a bloody religious warfare.

But: it is people like you, that I am looking for. And in this respect my post was already successful.
 

AnalogSteph

Major Contributor
Joined
Nov 6, 2018
Messages
3,338
Likes
3,278
Location
.de
Whatever happens, make sure that you are well aware of the limitations of your approach:
  • You may find it difficult to model power supply sag under load accurately.
  • Modelling of thermals is likely to be cumbersome and crude at best. If an amplifier shows increased SMPTE IMD due to bias modulation, you're not going to see that.
  • Quality of models may be all over the place.
  • There are a few things that SPICE tends to not model accurately or at all (BJT feedback capacitance variation comes to mind).
Simulation is great for proof of concept, but I would not expect the last word in accuracy.

This would be a classic project for the diyAudio "Solid State" forum IMHO.
 
OP
sepp2gl

sepp2gl

Member
Joined
Sep 19, 2020
Messages
31
Likes
5
Location
Germany
I am sure, there are even more limitations, considering, that my spice models of loudspeaker are linear models with lumped components, that I know are non-linear dependent on displacement or temperature.
So I am going to start with small signal analysis, where non-linearity might be less effective.
Science will provide nonlinear extensions of spice models or non-linear models beyond spice's applicability.

Indeed my purpose is proof of concept esp. I-Drive vs. U-Drive.
In the moment I believe, that I-Drive might give a substantial advantage, because current is directly proportional to the driving force.
But I would like to say "I know" rather than "I believe". I monitored publications in AES indication, that I am not entirely wrong.

Looking at your advice in more detail:
  • You may find it difficult to model power supply sag under load accurately.
    >>> might be modelled with Spice, but is not my main primary scope.
  • Modelling of thermals is likely to be cumbersome and crude at best.
    >>> This will be difficult to model without detailed measurements or manufacturer data.
    >>> I am a retired engineer; extended testing of thermal behaviour would definitely exceed my limitations.
    If an amplifier shows increased SMPTE IMD due to bias modulation, you're not going to see that.
    >>> currently I struggle with acronyms: what does SMPTE stand for? ...and what is IMHO?
  • There are a few things that SPICE tends to not model accurately or at all (BJT feedback capacitance variation comes to mind).
    >>> At the moment I am using manufacturer-generated spice models,
    >>> but I am aware that i.g. Bob Cordell adjusted a lot of them for his purpose
diyAudio is another forum, that I am monitoring. To me it has a high scientific quality ranking already.
The web is a universe, with a tremendously high number of knowledge-sources, that might help my project in one way or the other...or not.
I am happy to have found this one recently by recommendation of someone in another forum.
The discussion develops in a very positive way.
 

EdW

Senior Member
Joined
Jul 5, 2020
Messages
329
Likes
413
Location
Cambridge, UK
You probably know many of the issues already so I’m probably repeating stuff you already know! I assume you are intending to use LTSpice. I haven’t used LTSpice much having been spoilt using Cadence design software whilst I was working. Models, particularly for the O/P transistors in high current operation, are key if you want to investigate amplifier linearity at high signal levels into low Z loads. I anticipate that distortion modelling will test the simulator particularly when you start tightening reltol and controlling the time step (in order to calculate very high linearities) etc. if you haven’t already tried. A common failure of all Spice simulators would be the time step control dropping into the sub picosecond region, locking up and exiting with some message like ‘time step too small’. Good device modelling with no discontinuities in the derivatives of the equations describing operation help here. Bipolar devices are generally more benign than MOSFETs. Bob Cordell’s book ‘Designing Audio Amplifiers’ has a section on simulation and his website has a download of some Spice models. The book also mentions the load imposed by loudspeakers as does another book ‘Audio power amplifier design handbook’ by Douglas Self. Both these books shows schematics of amplifiers with component values etc.

Many schematics of commercial amplifiers are available on the web. Some to add to your list: the previous generation of Bryston Power amps are there as are old favourites like the Quad 606 and if you have patience you could add them to your schematics portfolio.

Good luck with your investigations!
 
OP
sepp2gl

sepp2gl

Member
Joined
Sep 19, 2020
Messages
31
Likes
5
Location
Germany
Hi Ed and thanks for your input.

Both Bryston and Quad have a very unique concept.
- Bryston has a strange combination of emitter/collector output and in some cases a kind of floating cascode stage.
- Quad current dumping was entirely unknown to me so far
I need to have a closer look on both to gain understanding.

Douglas Self's book can be downloaded and I did so already.
Bob Cordell's seems to have quite some interesting chapters either.
In fact I alrady downloaded his modified models.

For spice simulation I am using NGspice as I prefer working with Linux.
NGspice can be skripted so that simulations can be standardized for any amplifier.
For Windows I would either recommend LTspice or Micro-Cap.
I do not know, if they can be skripted, but the analysis features look very bright.
Maybe I will check, if they can do simulations based on spice-netlist rather than schematic input; so I would only need to input the schematic once.

Concerning tweeking of spice-simulation params, I have to admid, that at the moment I use standard setting.
I am not a real expert on spice; maybe more or less an advanced beginner. If issues will come up, I will gain expertise to fix them.

T2US, sepp2gl
 

EdW

Senior Member
Joined
Jul 5, 2020
Messages
329
Likes
413
Location
Cambridge, UK
Yes the Quad and Bryston designs are interesting . . ... A schematic for a hypex class D might also be interesting to analyse although I’m not quite sure where to get one (also probably only works under transient simulation).
Transient simulation is the tool you’ll need for Fourier analysis and this is where SPICE most frequently falls over. Reltol, abstol, vntol are the parameters which determine when the interation of the nodal conditions at a given time point are sufficiently accurate and the simulation can move on to the next time point. So for lower distortion we need to consider tightening these but be aware that the defaults for vntol and abstol (volts and current respectively) are set with voltages and currents found in small analog ICs not audio power amps. I was looking through my books on SPICE - I haven’t seen one available as a free download but Andrew Vladimirescu’s ‘the Spice Book’ isn’t bad and can be purchased pretty cheaply online.
Another thing to be aware of is that the Fourier tool doesn’t estimate the equispaced points between simulation points accurately (this means it gives pessimistic distortion estimates) so it is necessary to force Spice to simulate at the equispaced time points as well as the points chosen by the he simulator. Sometimes the time step control can help here, alternatively run a small square wave generator with an edge transition everytime you need a simulation point. Effectively the generator forces Spice to resimulate at that timepoints you need for your accurate Fourier analysis.
 
OP
sepp2gl

sepp2gl

Member
Joined
Sep 19, 2020
Messages
31
Likes
5
Location
Germany
I've got a spice book from Paul Tuinenga, which is from 1992 and might be way off concerning today's results-presentation capabilities.
The spice skript syntax is explained in the ngspice-manual. The plot-orientaton gave me quite some challenges, storing simulated vectors in a structure called "plot". It took some time to get awareness, that every analysis (OP, DC, AC, TRAN, etc...) automatically generates a new plot-structure, that encapsules the generated vectors. But learning is fun...
 

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,376
Likes
234,526
Location
Seattle Area
Good project. A quick search on AES website shows some potentially useful papers:

https://www.aes.org/e-lib/browse.cfm?elib=17524

Performance Comparison Between Nested Differentiating Feedback Loops and Classic Three Stage Operational Amplifier Architectures: A SPICE-Based Simulation Approach


https://www.aes.org/e-lib/browse.cfm?elib=7481
A MOSFET Model for the Simulation of Amplifier Nonlinearity

https://secure.aes.org/forum/pubs/conventions/?elib=16430
Efficiency Optimization of Class G Amplifiers: Impact of the Input Signals
 

amirm

Founder/Admin
Staff Member
CFO (Chief Fun Officer)
Joined
Feb 13, 2016
Messages
44,376
Likes
234,526
Location
Seattle Area
currently I struggle with acronyms: what does SMPTE stand for? ...and what is IMHO?
SMPTE is a standards organization that has defined a profile for dual-tone IMD testing. This is what I use in my tests. There are other organizations which have picked other frequencies and amplitudes for them.

IMHO means "In My Humble Opinion." :)
 

EdW

Senior Member
Joined
Jul 5, 2020
Messages
329
Likes
413
Location
Cambridge, UK
I've got a spice book from Paul Tuinenga, which is from 1992 and might be way off concerning today's results-presentation capabilities.
The spice skript syntax is explained in the ngspice-manual. The plot-orientaton gave me quite some challenges, storing simulated vectors in a structure called "plot". It took some time to get awareness, that every analysis (OP, DC, AC, TRAN, etc...) automatically generates a new plot-structure, that encapsules the generated vectors. But learning is fun...
There are 2 aspects to running SPICE. One is to understand what is happening inside the program and what it can do and can’t do. The Tuinenga book should be able to help you here and should save you a lot of frustration! The other concerns results and presentations, unique to the individual SPICE program, which is generally easier to comprehend (but can still be quite frustrating).

If you have got the time to learn SPICE it is an incredibly powerful program and can teach you a lot about circuit design in the process. Enjoy your project and don’t hesitate to request help on this forum where there must be quite a few members proficient in its use. I would also like to know how the project progresses and I expect many other would too

Good luck!
 

EdW

Senior Member
Joined
Jul 5, 2020
Messages
329
Likes
413
Location
Cambridge, UK
Yes the Quad and Bryston designs are interesting . . ... A schematic for a hypex class D might also be interesting to analyse although I’m not quite sure where to get one (also probably only works under transient simulation).
Transient simulation is the tool you’ll need for Fourier analysis and this is where SPICE most frequently falls over. Reltol, abstol, vntol are the parameters which determine when the interation of the nodal conditions at a given time point are sufficiently accurate and the simulation can move on to the next time point. So for lower distortion we need to consider tightening these but be aware that the defaults for vntol and abstol (volts and current respectively) are set with voltages and currents found in small analog ICs not audio power amps. I was looking through my books on SPICE - I haven’t seen one available as a free download but Andrew Vladimirescu’s ‘the Spice Book’ isn’t bad and can be purchased pretty cheaply online.
Another thing to be aware of is that the Fourier tool doesn’t estimate the equispaced points between simulation points accurately (this means it gives pessimistic distortion estimates) so it is necessary to force Spice to simulate at the equispaced time points as well as the points chosen by the he simulator. Sometimes the time step control can help here, alternatively run a small square wave generator with an edge transition everytime you need a simulation point. Effectively the generator forces Spice to resimulate at that timepoints you need for your accurate Fourier analysis.
I did a quick web search and the Vladimirescu book is available as a download from PDF Drive. Obviously the copyright situation might be a little contentious . .
 
OP
sepp2gl

sepp2gl

Member
Joined
Sep 19, 2020
Messages
31
Likes
5
Location
Germany
@amirm: IMHO is GREAT :D
thanks for the AES-links (unfortunately I am not a member (yet)).
I highly appreciate your support. Would you be able to provide the first two papers?

The Class G is out-of-scope for the time being, just like any switch-mode amps.
This is beyond my experience (linear audio only; 2 old to Rock'n Roll...2 young to die ;)).

T2US, sepp2gl
 
OP
sepp2gl

sepp2gl

Member
Joined
Sep 19, 2020
Messages
31
Likes
5
Location
Germany
@EdW:
Thanks a lot for your encouragenment.
It means a lot to me.
 

boXem

Major Contributor
Audio Company
Joined
Jun 19, 2019
Messages
2,014
Likes
4,853
Location
Europe
Yes the Quad and Bryston designs are interesting . . ... A schematic for a hypex class D might also be interesting to analyse although I’m not quite sure where to get one (also probably only works under transient simulation).
Transient simulation is the tool you’ll need for Fourier analysis and this is where SPICE most frequently falls over. Reltol, abstol, vntol are the parameters which determine when the interation of the nodal conditions at a given time point are sufficiently accurate and the simulation can move on to the next time point. So for lower distortion we need to consider tightening these but be aware that the defaults for vntol and abstol (volts and current respectively) are set with voltages and currents found in small analog ICs not audio power amps. I was looking through my books on SPICE - I haven’t seen one available as a free download but Andrew Vladimirescu’s ‘the Spice Book’ isn’t bad and can be purchased pretty cheaply online.
Another thing to be aware of is that the Fourier tool doesn’t estimate the equispaced points between simulation points accurately (this means it gives pessimistic distortion estimates) so it is necessary to force Spice to simulate at the equispaced time points as well as the points chosen by the he simulator. Sometimes the time step control can help here, alternatively run a small square wave generator with an edge transition everytime you need a simulation point. Effectively the generator forces Spice to resimulate at that timepoints you need for your accurate Fourier analysis.
A few years ago, I managed to get an Hypex UcD running in LTspice, both transient and transfer function. Even the distortion analysis was providing plausible results. I was quite impressed to be honest.
 
OP
sepp2gl

sepp2gl

Member
Joined
Sep 19, 2020
Messages
31
Likes
5
Location
Germany
@amirm:
how is the situation concerning quality of switchmode-amps today?
Are they really competitive compared to linear high-end amps?
I know, they are way more efficient, but are they really good?
 
OP
sepp2gl

sepp2gl

Member
Joined
Sep 19, 2020
Messages
31
Likes
5
Location
Germany
@fred Jaquod:
would you be willing to provide the LTSpice files to this project?

for Info: This is my current setup
1600757424976.png

The Loudspeaker-Model:
1600757819751.png
 

Attachments

  • 1600757803972.png
    1600757803972.png
    41 KB · Views: 81

pma

Major Contributor
Joined
Feb 23, 2019
Messages
4,591
Likes
10,728
Location
Prague
Hello Pavel,
thank you for the link to your website.
Very interesting, partly surprising results.
It explains, why some people use I-Drive for tweeter-amps, whereas I thought it would be especially advantage for woofers.

Are your results measured or simulated results?
Which toolchain did you use for the tests?
Did you do any scientific publications about it?

kr, sepp2gl

Hello Sepp,
thank you, all the distortion plots are measured, not simulated. There is always an explanation, in the text, what was measured.

BR, Pavel
 
Top Bottom