Hi all,
I was wondering if there is a definitive guide on what parameters to measure when simulating audio power amplifier?
I have found an example called 100W in LTSpice examples folder, but not sure how it runs and what it measures.
In particular, line by line here it is:
.tran 10m
I know that this is transient response with 10m seconds length.
It looks like the Vin amplitude is stepped by some value because when I run the simulation I see multiple sine outputs.
These lines probably have to do with this something:
.param V=1.44 ; 100W RMS
.step oct param V 1m 1.44 2
.four 1K V(out)
I know that this runs fourier analysis to calculate THD. To see report I go to View-SPICE Error Log.
But there are two values shown:
Partial Harmonic Distortion: 0.001013%
Total Harmonic Distortion: 0.014318%
Should I look at Total HD?
;.ac oct 50 1M 10Meg ; plot V(out)/V(out1) to see 72° phase margin @ 950kHz
This is confusing as I am not sure this is measured at all?
;.dc temp -55 125 1
This plots temperature vs voltage at out - basically shows how the offset depends on the temp.
;.noise V(out) Vin oct 10 10 20K
Running this command plots noise vs frequency. Noise is in nV/Hz1/2.
How to convert to dB?
What about signal to noise ratio in dB?
.options plotwinsize=0 numdgt=15 noopiter
not sure what this does...
What about measuring OLG (open loop gain)?
Or any other measurements for an amp?
Looking for help from more experienced folks here.
Thanks
I was wondering if there is a definitive guide on what parameters to measure when simulating audio power amplifier?
I have found an example called 100W in LTSpice examples folder, but not sure how it runs and what it measures.
In particular, line by line here it is:
.tran 10m
I know that this is transient response with 10m seconds length.
It looks like the Vin amplitude is stepped by some value because when I run the simulation I see multiple sine outputs.
These lines probably have to do with this something:
.param V=1.44 ; 100W RMS
.step oct param V 1m 1.44 2
.four 1K V(out)
I know that this runs fourier analysis to calculate THD. To see report I go to View-SPICE Error Log.
But there are two values shown:
Partial Harmonic Distortion: 0.001013%
Total Harmonic Distortion: 0.014318%
Should I look at Total HD?
;.ac oct 50 1M 10Meg ; plot V(out)/V(out1) to see 72° phase margin @ 950kHz
This is confusing as I am not sure this is measured at all?
;.dc temp -55 125 1
This plots temperature vs voltage at out - basically shows how the offset depends on the temp.
;.noise V(out) Vin oct 10 10 20K
Running this command plots noise vs frequency. Noise is in nV/Hz1/2.
How to convert to dB?
What about signal to noise ratio in dB?
.options plotwinsize=0 numdgt=15 noopiter
not sure what this does...
What about measuring OLG (open loop gain)?
Or any other measurements for an amp?
Looking for help from more experienced folks here.
Thanks
Attachments
You may find this helpful:
Youtube video tutorials for simulating audio amplifiers using LTSpice by SW Audio
Youtube video tutorials for simulating audio amplifiers using LTSpice by SW Audio
Start with the basics.
You normally need to run a sim for longer than 10ms to get a good FFT result and you also often have to 'take out' time constants by temporarily making any electrolytics such as coupling and feedback caps much much larger.
A lot of info is in the LT thread. Unfortunately the images keep breaking following the move to the new platform:
https://www.diyaudio.com/community/...from-beginner-to-advanced.260627/post-4031841
Set the sim to run just one input level, not multiple values and at least at first set the timestep correctly.
For OLG I normally either make the feedback return zero impedance at AC or make the feedback resistor a massive inductor of appropriate resistance. Quick and easy 🙂
You normally need to run a sim for longer than 10ms to get a good FFT result and you also often have to 'take out' time constants by temporarily making any electrolytics such as coupling and feedback caps much much larger.
A lot of info is in the LT thread. Unfortunately the images keep breaking following the move to the new platform:
https://www.diyaudio.com/community/...from-beginner-to-advanced.260627/post-4031841
Set the sim to run just one input level, not multiple values and at least at first set the timestep correctly.
For OLG I normally either make the feedback return zero impedance at AC or make the feedback resistor a massive inductor of appropriate resistance. Quick and easy 🙂