LTspice THD+N and other questions...

On Wed, 12 Nov 2003 10:40:07 -0800, ldg <lgipson@ix.netcom.com> wrote:

On Wed, 12 Nov 2003 10:12:01 -0700, Jim Thompson
invalid@invalid.invalid> wrote:



Distortion analysis in PSpice is done in a .TRAN situation and applies
accurately to the amplitude used for test.... you must vary amplitude
to get a full picture of distortion.

...Jim Thompson

I have the manuals here for Pspice 7.1. In that edition, there was no
..disto command. They recommended doing a transient run with the .four
command. Is this still the case? If so, I think the post processor
fft in LTspice is as good or better.

As I recall the .four command only looks for harmonic spectrum of the
specified fundamental. It would miss, for instance, an aliased noise
generated by sampling that's not a harmonic. Is my memory accurate?
After all, I'm getting old :)

Regards,
Larry
 
On Wed, 12 Nov 2003 11:12:14 -0800, ldg <lgipson@ix.netcom.com> wrote:

On Wed, 12 Nov 2003 10:40:07 -0800, ldg <lgipson@ix.netcom.com> wrote:

On Wed, 12 Nov 2003 10:12:01 -0700, Jim Thompson
invalid@invalid.invalid> wrote:



Distortion analysis in PSpice is done in a .TRAN situation and applies
accurately to the amplitude used for test.... you must vary amplitude
to get a full picture of distortion.

...Jim Thompson

I have the manuals here for Pspice 7.1. In that edition, there was no
.disto command. They recommended doing a transient run with the .four
command. Is this still the case? If so, I think the post processor
fft in LTspice is as good or better.

As I recall the .four command only looks for harmonic spectrum of the
specified fundamental. It would miss, for instance, an aliased noise
generated by sampling that's not a harmonic. Is my memory accurate?
After all, I'm getting old :)

Regards,
Larry
Did you see my prior post? PSpice does not have .DISTO.

To see a full spectrum, run .TRAN analysis, then, in Probe, select
Fourier in the "Trace" pull-down. Then you see everything, harmonics,
cross-products, the pain-and-agony you'd rather wasn't there ;-)

For .FOUR you must select Fourier in the .TRAN *Setups* (prior to
simulation), select fundamental frequency and number of harmonics
desired. (This is classic distortion analysis as would be seen using
an instrument which tunes out the fundamental.)

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
 
On Wed, 12 Nov 2003 12:29:44 -0800, ldg <lgipson@ix.netcom.com> wrote:

On Wed, 12 Nov 2003 12:38:40 -0700, Jim Thompson
invalid@invalid.invalid> wrote:



Did you see my prior post? PSpice does not have .DISTO.

I think we we're posting at the same time. So no. Sorry :)

To see a full spectrum, run .TRAN analysis, then, in Probe, select
Fourier in the "Trace" pull-down. Then you see everything, harmonics,
cross-products, the pain-and-agony you'd rather wasn't there ;-)


I forgot about the Probe fft. It wasn't the best, but it was easy to
use and included way back in the DOS days of Pspice. I've always
liked the Pspice post processor.

We're saying the same things about the rest . . .

Regards,
Larry
Probe FFT is good *IF* you choose a max timestep no larger than about
1/32 of the period of the lowest frequency of interest and then run
the .TRAN for at least a few hundred periods.

Experiment and you'll see that a smaller timestep pushes the "noise
floor" down.

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
 
On Wed, 12 Nov 2003 12:38:40 -0700, Jim Thompson
<invalid@invalid.invalid> wrote:


Did you see my prior post? PSpice does not have .DISTO.
I think we we're posting at the same time. So no. Sorry :)
To see a full spectrum, run .TRAN analysis, then, in Probe, select
Fourier in the "Trace" pull-down. Then you see everything, harmonics,
cross-products, the pain-and-agony you'd rather wasn't there ;-)
I forgot about the Probe fft. It wasn't the best, but it was easy to
use and included way back in the DOS days of Pspice. I've always
liked the Pspice post processor.

We're saying the same things about the rest . . .

Regards,
Larry
 
On Wed, 12 Nov 2003 15:11:43 GMT, "Mike Rocket J. Squirrel Elliott"
<j.michael.elliottAT@REMOVETHEOBVIOUSadelphiaDOT.net> wrote:

ubtract the input from the output of the DUT as there may be phase &
amplitude differences - you need to extract the fundamental of the
input and notch that from the DUT output.

You're right -- I overlooked that.
The little circuit I conjured up actually does just this, but doesn't
correct for the group delay of the filter. That's probably why the
cancellation isn't better. It's not bad though at -65dB (from the
fft.)

Regards,
Larry
 
Jim Thompson wrote:
On Wed, 12 Nov 2003 12:29:44 -0800, ldg <lgipson@ix.netcom.com> wrote:


On Wed, 12 Nov 2003 12:38:40 -0700, Jim Thompson
invalid@invalid.invalid> wrote:



Did you see my prior post? PSpice does not have .DISTO.

I think we we're posting at the same time. So no. Sorry :)

To see a full spectrum, run .TRAN analysis, then, in Probe, select
Fourier in the "Trace" pull-down. Then you see everything, harmonics,
cross-products, the pain-and-agony you'd rather wasn't there ;-)


I forgot about the Probe fft. It wasn't the best, but it was easy to
use and included way back in the DOS days of Pspice. I've always
liked the Pspice post processor.

We're saying the same things about the rest . . .

Regards,
Larry


Probe FFT is good *IF* you choose a max timestep no larger than about
1/32 of the period of the lowest frequency of interest and then run
the .TRAN for at least a few hundred periods.

Experiment and you'll see that a smaller timestep pushes the "noise
floor" down.
Right, but none of this lets you view the distortion residue waveform.
Audio designers use a low-distortion sine wave, a thd meter, and an
oscilloscope to view the distortion. You can sum the residue with the
input signal in the 'scope to get an exaggerated picture of how the sine
wave has been distorted. To the trained eye (there are good eye training
schools throughout the country, just look under "Eye Training and
Obedience Schools" in the Yellow Pages) the shape of the distortion will
give you a feel for how the DUT will sound.

--
Mike "Rocket J Squirrel" Elliott
 
On Wed, 12 Nov 2003 20:59:29 GMT, "Mike Rocket J. Squirrel Elliott"
<j.michael.elliottAT@REMOVETHEOBVIOUSadelphiaDOT.net> wrote:

[snip]
Right, but none of this lets you view the distortion residue waveform.
Audio designers use a low-distortion sine wave, a thd meter, and an
oscilloscope to view the distortion. You can sum the residue with the
input signal in the 'scope to get an exaggerated picture of how the sine
wave has been distorted. To the trained eye (there are good eye training
schools throughout the country, just look under "Eye Training and
Obedience Schools" in the Yellow Pages) the shape of the distortion will
give you a feel for how the DUT will sound.
Oh me gawwwwd, you must be a toooobz aficionado ;-)

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

I love to cook with wine. Sometimes I even put it in the food.
 
Jim Thompson wrote:
On Wed, 12 Nov 2003 20:59:29 GMT, "Mike Rocket J. Squirrel Elliott"
j.michael.elliottAT@REMOVETHEOBVIOUSadelphiaDOT.net> wrote:

[snip]

Right, but none of this lets you view the distortion residue waveform.
Audio designers use a low-distortion sine wave, a thd meter, and an
oscilloscope to view the distortion. You can sum the residue with the
input signal in the 'scope to get an exaggerated picture of how the sine
wave has been distorted. To the trained eye (there are good eye training
schools throughout the country, just look under "Eye Training and
Obedience Schools" in the Yellow Pages) the shape of the distortion will
give you a feel for how the DUT will sound.


Oh me gawwwwd, you must be a toooobz aficionado ;-)
My mentor, waaaaaayyy back in the late '70s, taught me the secrets of
how to interpret the output of a THD analyzer. The great audio designer,
Bascom H. King.

--
Mike "Rocket J Squirrel" Elliott
 
On Wed, 12 Nov 2003 13:26:05 -0700, Jim Thompson
<invalid@invalid.invalid> wrote:

Probe FFT is good *IF* you choose a max timestep no larger than about
1/32 of the period of the lowest frequency of interest and then run
the .TRAN for at least a few hundred periods.

Experiment and you'll see that a smaller timestep pushes the "noise
floor" down.
When I used it, it didn't have programmable filters and so forth. No
zoom as I remember. So it was pretty useless for a lot of things.
(Hope it has improved.) But it was there and it was a post processor.
Many spice programs don't provide this even now.

Regards,
Larry
 
Kevin Aylward wrote:
So Mike, have you ever consisded basing a Spice engine on evolutionary
GA, Genetic Algorithms? It might be that for really large circuits they
might be much faster.
Genetic algorithms are not known for speed. They are used for problems
with complicated search spaces and possibly many local extrema. I don't
know the needs of a spice engine, but if the "surface" you are optimizing
has any nice structure at all, a GA will likely be slower than more
conventional direction-based optimizers.

-Tom
 
Kevin Aylward wrote:
Standed Spice itself (e.g. SuperSpice:)) also has direct small signal
plots of THD and IMD against frequency. This is a ".disto" run. This can
be a lot easier for doing initial design.
Kevin, do you know if .disto is what is behind the THD calculations
done by EWB? I've used those and found them very misleading---the
results were much smaller than what one found from a Fourier analysis.
The EWB literature said the THD calculations were based on something
like a Taylor expansion. I wonder if this is simply not a good
approximation for many circuits. It's one of the reasons I abandoned
EWB....

-Tom

--

To respond by email, replace "somewhere" with "astro" in the
return address.
 
On Wed, 12 Nov 2003 12:04:42 -0700, Jim Thompson
<invalid@invalid.invalid> wrote:

1. Circuits that use .DISTO (small-signal distortion) analysis. U.C.
Berkeley SPICE supports the .DISTO analysis, but contains errors.
And a total pain in the neck to update or correct. There's ways
around the pain, but it's all major work, and mostly ugly. They were
wise to chuck it.

Instead of the .DISTO analysis, we recommend running a transient
analysis and looking at the output spectrum using the Fourier
transform mode in Probe. This technique shows the distortion
(spectral) products for both small-signal and large-signal distortion.
....but doesn't do much for two- or three-tone problems, unless you're
willing to waaaaait. But a nice job for a harmonic balance analysis.

--Steve
 
Tom Loredo wrote:
Kevin Aylward wrote:

Standed Spice itself (e.g. SuperSpice:)) also has direct small
signal plots of THD and IMD against frequency. This is a ".disto"
run. This can be a lot easier for doing initial design.

Kevin, do you know if .disto is what is behind the THD calculations
done by EWB?
Not sure. If its from an ac run, it will be .disto, if from a .tran, it
will be fft.

I've used those and found them very misleading---the
results were much smaller than what one found from a Fourier analysis.
The EWB literature said the THD calculations were based on something
like a Taylor expansion. I wonder if this is simply not a good
approximation for many circuits.
This approximation is ok in principle. It has been done up to 3rd order
terms in spice. However, they may be actual bugs in its implementation.
Its quite a complicated thing to do.

It's one of the reasons I abandoned
EWB....
To be honest, I have not done much on verifying how accurate it is. I'll
have a look and see. For referance, a single simple bipolar transister
stage will have 2nd harm= Vi(mv)% , 3rd harm = 3.3m Vi(mv)^2 (I think)
distortion, so you can do a little check.

i.e 1mv should give about 1% 2nd harmonic.

Kevin Aylward
salesEXTRACT@anasoft.co.uk
http://www.anasoft.co.uk
SuperSpice, a very affordable Mixed-Mode
Windows Simulator with Schematic Capture,
Waveform Display, FFT's and Filter Design.

http://www.anasoft.co.uk/replicators/index.html

Understanding, is itself an emotion, i.e. a feeling.
Emotions or feelings can only be "understood" by
consciousness. "Understanding" consciousness can
therefore only be understood by consciousness itself,
therefore the "hard problem" of consciousness, is
intrinsically unsolvable.

Physics is proven incomplete, that is, no
understanding of the parts of a system can
explain all aspects of the whole of such system.
 
Mike Rocket J. Squirrel Elliott wrote:
Jim Thompson wrote:
On Wed, 12 Nov 2003 12:29:44 -0800, ldg <lgipson@ix.netcom.com
wrote:


On Wed, 12 Nov 2003 12:38:40 -0700, Jim Thompson
invalid@invalid.invalid> wrote:



Did you see my prior post? PSpice does not have .DISTO.

I think we we're posting at the same time. So no. Sorry :)

To see a full spectrum, run .TRAN analysis, then, in Probe, select
Fourier in the "Trace" pull-down. Then you see everything,
harmonics, cross-products, the pain-and-agony you'd rather wasn't
there ;-)


I forgot about the Probe fft. It wasn't the best, but it was easy
to use and included way back in the DOS days of Pspice. I've always
liked the Pspice post processor.

We're saying the same things about the rest . . .

Regards,
Larry


Probe FFT is good *IF* you choose a max timestep no larger than about
1/32 of the period of the lowest frequency of interest and then run
the .TRAN for at least a few hundred periods.

Experiment and you'll see that a smaller timestep pushes the "noise
floor" down.

Right, but none of this lets you view the distortion residue waveform.
Audio designers use a low-distortion sine wave, a thd meter, and an
oscilloscope to view the distortion. You can sum the residue with the
input signal in the 'scope to get an exaggerated picture of how the
sine wave has been distorted. To the trained eye (there are good eye
training schools throughout the country, just look under "Eye
Training and Obedience Schools" in the Yellow Pages) the shape of the
distortion will give you a feel for how the DUT will sound.
Ahmmm sceptical on this one. Take a square wave and shift the phase of
its harmonics so that its shape looks totally different. It still sounds
the same.

Secondly, if its below about 0.01% (maybe even 0.1%), which has been
trivilly easy to do for at at least the last 20 years, you wont hear it,
what ever it is.

Kevin Aylward
salesEXTRACT@anasoft.co.uk
http://www.anasoft.co.uk
SuperSpice, a very affordable Mixed-Mode
Windows Simulator with Schematic Capture,
Waveform Display, FFT's and Filter Design.

http://www.anasoft.co.uk/replicators/index.html

Understanding, is itself an emotion, i.e. a feeling.
Emotions or feelings can only be "understood" by
consciousness. "Understanding" consciousness can
therefore only be understood by consciousness itself,
therefore the "hard problem" of consciousness, is
intrinsically unsolvable.

Physics is proven incomplete, that is, no
understanding of the parts of a system can
explain all aspects of the whole of such system.
 
Kevin Aylward wrote:

Mike Rocket J. Squirrel Elliott wrote:

Jim Thompson wrote:

On Wed, 12 Nov 2003 12:29:44 -0800, ldg <lgipson@ix.netcom.com
wrote:



On Wed, 12 Nov 2003 12:38:40 -0700, Jim Thompson
invalid@invalid.invalid> wrote:




Did you see my prior post? PSpice does not have .DISTO.

I think we we're posting at the same time. So no. Sorry :)


To see a full spectrum, run .TRAN analysis, then, in Probe, select
Fourier in the "Trace" pull-down. Then you see everything,
harmonics, cross-products, the pain-and-agony you'd rather wasn't
there ;-)


I forgot about the Probe fft. It wasn't the best, but it was easy
to use and included way back in the DOS days of Pspice. I've always
liked the Pspice post processor.

We're saying the same things about the rest . . .

Regards,
Larry


Probe FFT is good *IF* you choose a max timestep no larger than about
1/32 of the period of the lowest frequency of interest and then run
the .TRAN for at least a few hundred periods.

Experiment and you'll see that a smaller timestep pushes the "noise
floor" down.

Right, but none of this lets you view the distortion residue waveform.
Audio designers use a low-distortion sine wave, a thd meter, and an
oscilloscope to view the distortion. You can sum the residue with the
input signal in the 'scope to get an exaggerated picture of how the
sine wave has been distorted. To the trained eye (there are good eye
training schools throughout the country, just look under "Eye
Training and Obedience Schools" in the Yellow Pages) the shape of the
distortion will give you a feel for how the DUT will sound.


Ahmmm sceptical on this one. Take a square wave and shift the phase of
its harmonics so that its shape looks totally different. It still sounds
the same.

Secondly, if its below about 0.01% (maybe even 0.1%), which has been
trivilly easy to do for at at least the last 20 years, you wont hear it,
what ever it is.
Guitar effects boxes and suchlike -- a big market! -- are designed to
distort the waveform, and the amount of distortion can be quite high.
The designers and manufacturers achieve their signature sound by
deciding (by ear) how they want the signal distorted. You can look at
the FFT of the DUT's output to see the harmonics, but that's indirect
when the goal is to achieve a certain waveform to get the sound you're
after. Looking at the distortion residue is direct: when displayed with
the input signal you can pretty much see how the signal has been
manipulated, and, knowing the circuit, get a good idea about which
elements and biases you need to tweak for your signature "sound."

--
Mike "Rocket J Squirrel" Elliott
 
Mike Rocket J. Squirrel Elliott wrote:
Kevin Aylward wrote:


Right, but none of this lets you view the distortion residue
waveform. Audio designers use a low-distortion sine wave, a thd
meter, and an oscilloscope to view the distortion. You can sum the
residue with the input signal in the 'scope to get an exaggerated
picture of how the sine wave has been distorted. To the trained eye
(there are good eye training schools throughout the country, just
look under "Eye Training and Obedience Schools" in the Yellow
Pages) the shape of the distortion will give you a feel for how the
DUT will sound.


Ahmmm sceptical on this one. Take a square wave and shift the phase
of its harmonics so that its shape looks totally different. It still
sounds the same.

Secondly, if its below about 0.01% (maybe even 0.1%), which has been
trivilly easy to do for at at least the last 20 years, you wont hear
it, what ever it is.

Guitar effects boxes and suchlike -- a big market! -- are designed to
distort the waveform, and the amount of distortion can be quite high.
Well, I misread your intent a bit here. I am actually a guitarist
myself, started when I was 11 years old. I currently use a Fender twin
tube amp, http://www.anasoft.co.uk/founder.html

The designers and manufacturers achieve their signature sound by
deciding (by ear) how they want the signal distorted.
Yes. I have been a designer at two pro audio companies.

You can look at
the FFT of the DUT's output to see the harmonics, but that's indirect
when the goal is to achieve a certain waveform to get the sound you're
after.
But as I said, The picture of the wave is not unique.

Looking at the distortion residue is direct:
But not necessarily correlated with the sound.

when displayed
with the input signal you can pretty much see how the signal has been
manipulated, and, knowing the circuit, get a good idea about which
elements and biases you need to tweak for your signature "sound."
Maybe. Its a bit circular though.

Kevin Aylward
salesEXTRACT@anasoft.co.uk
http://www.anasoft.co.uk
SuperSpice, a very affordable Mixed-Mode
Windows Simulator with Schematic Capture,
Waveform Display, FFT's and Filter Design.

http://www.anasoft.co.uk/replicators/index.html

Understanding, is itself an emotion, i.e. a feeling.
Emotions or feelings can only be "understood" by
consciousness. "Understanding" consciousness can
therefore only be understood by consciousness itself,
therefore the "hard problem" of consciousness, is
intrinsically unsolvable.

Physics is proven incomplete, that is, no
understanding of the parts of a system can
explain all aspects of the whole of such system.
 

Welcome to EDABoard.com

Sponsor

Back
Top