# High Pass filter gain at higher frequency than cutoff frequency

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

This is my circuit;

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

LTSpice,

AC Analysis,

LTSpice,

• Does in simulation models your Capacitor has ESR? – Haris778 Mar 18 '16 at 8:49
• 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. – LvW Mar 18 '16 at 9:01
• @Haris778 no there isnt any ESR value in LTSpice , it just empty – massaimara98 Mar 18 '16 at 9:04
• @LvW you are mean if am i increasing time steps , can i close to my calculation ? – massaimara98 Mar 18 '16 at 9:04

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?

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.....

• 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 – massaimara98 Mar 18 '16 at 9:02
• I have no idea what your comment is about. Also try setting minimum time step so you get better resolution - this will improve accuracy. – Andy aka Mar 18 '16 at 9:07
• :) , 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) – massaimara98 Mar 18 '16 at 9:14

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.

• 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 ? – massaimara98 Mar 18 '16 at 9:27

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.

• 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... – massaimara98 Mar 18 '16 at 9:22