Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LTSpice THD calc bug, or my idiotic PEBKAC?

Status
Not open for further replies.

roscokhan

New Member
Hi All,

This has me confused, because it should be childishly elementally trivial. :-\

I have a weird problem with a *trivial, trivial* circuit within LTSpice 17.0.31 for OSX. I ran across this while simulating something more involved and couldn't get THD down to anything like a sane value.

The pared back test circuit (attached) has a SINE 'Input', a 10k/10k voltage divider, with the 'Output' at the node between the 10k resistors. I thought I'd see 0.0000000% THD for both input and output, but I see:

Input: 0.720625%; and
Output: 2.1555337%

I can't figure out why, but wondered whether this might be a bug of some kind (either with me(!), or with LTspice).

I have:

.param Freq 1k
.fourier {Freq} 10 2000 V(Input)
.fourier {Freq} 10 2000 V(Output)
.opt plotwinsize=0 numdgt=15
.tran 30s

Input is set to: SINE(0 1 {Freq})

In the FFT trace, I see various peaks below the fundamental, at -90dB(*) and below, which doesn't match my expectation.

I may be having a breakdown, but if I'm not - does anyone have some pointers? Is this perhaps a known issue, or my expectations are perhaps askew?


Many thanks,


Ross

---

(*) - My bad - I originally posted -30dB
 

Attachments

  • Screen Shot 2022-03-08 at 11.59.02.png
    Screen Shot 2022-03-08 at 11.59.02.png
    407.6 KB · Views: 207
  • Screen Shot 2022-03-08 at 11.59.31.png
    Screen Shot 2022-03-08 at 11.59.31.png
    292.9 KB · Views: 216
  • Screen Shot 2022-03-08 at 12.05.40.png
    Screen Shot 2022-03-08 at 12.05.40.png
    917.2 KB · Views: 209
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top