[ BUG ? ] Incoherent simulation result?

Hi all !

I’m designing an audio filter, and since yesterday I’m facing a weird issue.

I’ve create my second order high pass (not something really hard nor extreme in the conditions since it’s in the range 5Hz - 40 kHz…).

It’s specs are :

  • Fc = 4 KHz
  • Q = 1
  • G = 1

I’ve folowed the MT220 application note from analog devices to choose the values, as well as some documents from the school.

I’ve ended with this schematic. This is an MFB active filter with :
R1 (to ground) = 860 Ohm
R2 (to output) = 8kOhm
C1 = C2 = C3 = 15nF
(I can’t post more than one image…)

I’ve validated the values with an external site.
The value use real value rather than raw one, but 4045 Hz in place of 4 KHz is well, really close and perfectly fine.

The issue I’m facing is the QSPICE simulator results :


NOTE : *The output of this simulation is THIS circuit, place in another top circuit (where reside other filters). Actually, this top circuit only provide a ±7V supply and a sine that range from 1 Hz to 400 kHz (I was measuring a end attenuation to prevent alliasing from my DAC).

As you may see, I’m getting a -3dB point at ~14 kHz which is far from the defined values…
This let me on a point where I’ve got errors but no clue from it’s source…

Today I’ve designed the same schematic in LTSpice.
(I can’t post two image, so no output, but I didn’t touch any parameter, just copied the spice directive).
The tool is reporting a -3dB point near 4.1 kHz, which is well, much closer than what I expected than what QSPICE was showing…
With a little tunning as I’m able to do it easily should get me the wanted response quickly.

Small remarks :

  • I’ve configured both AOP to be the same, thus I used GlobalAOP in LTSPICE to not include any Linear reference which may include different models. Theses AOP where configured using the TI’s datasheet of the selected AOP (RC4558). → (AVOL = 100K, GBW = 4M, SR = 2.2M). This configuration was loaded on the two tools.
  • Simulation parameters where near the same, at the different that LTSpice was stopped at 50 kHz unless of 400 kHz. Isn’t important here since I’m looking at an error on ~4000 Hz.
  • Both tools where configured with 10k points per octave, so very little room for interpolation.
  • The parameters on QSPICE (R_tol and C_tol) are used to simulation different tolerances on the components. Locked to 1 with a directive .PARAM [Name] 1.

If any has an idea from where would come this behavior, I’m open. Actually, I suspect more me than the soft, but I don’t really see any other option…

Thanks by advance for all the one who will answer !

Try to use this formula to calculate resistors R1 and R2
Link: https://www.ti.com/lit/an/sboa230/sboa230.pdf?ts=1730040374855&ref_url=https%253A%252F%252Fwww.google.com%252F

image

MFB.qsch (8.8 KB)

Best regards

1 Like

Okay thanks for your answer !

I found the issue, and as i suspected it was on my side. But there is anyway a weird behavior of Qspice !

I mistyped one of my supply, thus the filter was powered between -7 and … -7 V.
This is totally an error of myself.

The weird behavior is that QSPICE isn’t really using theses supplies, since my signal was showing (I used a .TRAN spice command) correct amplitude, but centered at -7V.

This is what it make to look the supply.

And I’ve reproduced it on LTSpice, and it shown the expected behavior : It remain constant à -7V (there is no sine arround), and thus on AC analysis I can see my response doesn’t go higher than -300dB…
This is what I would expect on the QSpice output as well.

This would have enabled spotting the error way faster than looking at a weird response which is totally false and incoherent…

Thanks a lot !