2 Signals THD format

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I'm not sure that you can use use difference in the form v(outp)-V(outn).
You can use v(outp) or V(outn) as a single node, where you want to measure distortions. Try to use just single node and if it will work, you may use dependent voltage source to compute the difference and measure >FOUR at it's output. Also, .FOUR works only in transient analysis.
 
you can just clik & hold, the red cursor selects the node as usual, then turns black as you hold and drag and you can place it on the 2nd node, then release the L clik to get the difference

gives V(a,b) syntax, can be used as arg in .four - if you really must but the THD # isn't that helpful - looking at fft is much better, can do IMD for even more informative fft picture

or try my fundamental null circuit to get the distortion residual waveform http://www.diyaudio.com/forums/software-tools/101810-spice-simulation-37.html#post1333137
 
Last edited:
Thank you for the report.

The image is appended for the explanation.

There are two amplifiers.
Each output is OUTP(Green) and OUTN(Blue).
This is connected with the plus and the minus of the speaker.

Individual THD can be confirmed.

.option plotwinsize=0
.tran 1m
.four 5k 5 5 v(out) v(outn)

However, THD when making it to OUTP-OUTN(Red) cannot be confirmed.
Cannot this calculation be done with LT-Spice?

When my idea is wrong, I'm sorry.
 

Attachments

  • outp-outnTHD.png
    outp-outnTHD.png
    88.6 KB · Views: 75
the 2 nodes that you are differencing have to be inside one V(), separated by a comma

try:

.four 5k 5 5 v(outp,outn)

you will proably get poor results in fft noise floor if you don't specify a Tmaxstep small enough to give > 10e4 points per cycle, ~ 20n
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.