0
\$\begingroup\$

As i know , it's very common easy to find cutoff frequency and calculate gain at highpass filter.

This is my circuit;

schematic

simulate this circuit – Schematic created using CircuitLab

My source is 1mVp,300Hz frequency and high pass filter cutoff frequency is 10.26 Hz if i wasnt calculate wrong.

What is the problem ?

When i apply this signal to HP filter. Output is 965.67139µV from LTSpice , 988µV from ADsimPE but from my calculation output has to 0.9999 like that.

My Calculation:

\$ X_c = \large{\frac{1}{2*\pi*300*4.7\mu}} = 112.875\Omega \$

\$ Z = \sqrt{X_c^2 + R^2} = 3301.92\Omega \$

final voltage divider is

\$ V_o = \large{\frac{1mV * 3300}{3301.92} = 0.9994mV} \$

it isnt equal some much is it ? I mean if from the spice programs output is 0.9999 or 0.9998 or maybe 0.98 i can say there is error or maybe Negligible case which i dont know but they are saying 0.96 or 0.988... I cant expect that

There two possible in this situtation:

My calculation is wrong or SPICE programs are wrong.

and i also check it AC Analysis in two SPICE programs. they are say gain = 1 at 300 Hz .

Someone explain me , what's going here??? i cant even a trust simulation programs ?

Transient Response

ADIspicePE,

enter image description here

LTSpice,

enter image description here

AC Analysis,

ADISimPE,

enter image description here

LTSpice,

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ Does in simulation models your Capacitor has ESR? \$\endgroup\$
    – Haris778
    Commented Mar 18, 2016 at 8:49
  • \$\begingroup\$ Your ADIspicePE diagram (TRAN analysis) shows that you have selected a bad resolution (not enough time steps per period). Therefore, you cannot expect an exact result. \$\endgroup\$
    – LvW
    Commented Mar 18, 2016 at 9:01
  • \$\begingroup\$ @Haris778 no there isnt any ESR value in LTSpice , it just empty \$\endgroup\$ Commented Mar 18, 2016 at 9:04
  • \$\begingroup\$ @LvW you are mean if am i increasing time steps , can i close to my calculation ? \$\endgroup\$ Commented Mar 18, 2016 at 9:04

4 Answers 4

1
\$\begingroup\$

The basic problem is you are getting hung up on irrelevant details.

The filter rolloff frequency is 10.3 Hz, and your input frequency is 300 Hz. That means the input frequency is 29x the rolloff, or 4.9 octaves. That's "a lot", so the output amplitude is going to be very close to the input amplitude. Put another way, the filter gain will be 1.0 for practical purposes.

The expected filter gain is 1.0, and you're getting 1.00. What's the problem? You're upset because a numerical simulation is off by a fraction of a percent? Really!? Are you really going to implement this filter with a .1% resistor and capacitor?

\$\endgroup\$
0
\$\begingroup\$

When i apply this signal to HP filter. Output is 965.67139µV from LTSpice , 988µV from ADsimPE but from my calculation output has to 0.9999 like that.

The only thing I can think is that you have set your transient amplitude to 1 mV and not 1 V. Check the parameters for V1. You might find that your AC amplitude is 1 V but for transient analysis it's only 1 mV.

Aha.....

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ lol , yeah you are right but is it any difference result ? I mean we are doing at transient response right ? if you want i can change AC analysis images \$\endgroup\$ Commented Mar 18, 2016 at 9:02
  • \$\begingroup\$ I have no idea what your comment is about. Also try setting minimum time step so you get better resolution - this will improve accuracy. \$\endgroup\$
    – Andy aka
    Commented Mar 18, 2016 at 9:07
  • \$\begingroup\$ :) , i mean in ac analysis we check gain vs frequency right ? is there any difference between mV or V? Eventually , we are arguing here difference numbers right ? if i change the 1mV Amplitude AC analysis, result is will be the same gain ? (Gain = 1) \$\endgroup\$ Commented Mar 18, 2016 at 9:14
0
\$\begingroup\$

It looks like your 965.xx result is from reading the markers, rather than the ASCII values. Marker readout could be reading off the screen quantised to pixels, rather than the raw curves.

I haven't checked your hand calculation, but assuming it's right, the AC analysis answer of 1.00 may well be equal to 0.9994xx as far as a simulator is concerned, three 9s is mighty close to 1. I will admit though I am used to seeing a simulator reproduce the hand calculation answer to 7 decimal places.

You have discovered a deep vein of simulator issues. Investigate it, and it will stand you in very good stead when wondering whether to calculate from first principles or to simulate, and if simulating, what precautions to take to get results you expect.

Amongst the simulator gotchas (this is not a complete list by a long way) are a) if you sweep, check what intermediate points you have, so is there actually an analysis at your chosen frequency, or is the plot interpolating b) what model are you using for components, are they ideal, or do they have default imperfections c) specifically for transient analysis, what timessteps and solver are you using d) if you are interested in precision, output as numbers, don't read off a graph.

\$\endgroup\$
1
  • \$\begingroup\$ b) , iam using standart simulation capacitor and resistor are they ideal in simulation programs ? and from d) , if i use .meas in spice program is it more healthy than reading graph ? \$\endgroup\$ Commented Mar 18, 2016 at 9:27
0
\$\begingroup\$

The problem is the timestep. I copied your design into LTspice and set a timestep of 1 microsecond. The peak voltage is now 999.20132 microvolts, and increasing it further and measuring closer should give you the suggested value.

\$\endgroup\$
1
  • \$\begingroup\$ LvW , Neil_UK and you are saying is very make sense for me problem can be timestep but i changed to 2u to 1u timestep as you say ,result is the same again 965uV ,unbelievable... \$\endgroup\$ Commented Mar 18, 2016 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.