# Understanding a phase bump filter

For an application in the lab, I need a filter that bumps up the phase around 56 kHz by about 15 degrees, while not causing a big difference in gain at low and high frequencies. Ideally, it should also not reduce the gain by too much.

I came up with the idea that I could use a combination of capacitive and resistive voltage divider to do the job:

I measured its transfer function, and it seems to be working like a charm. Now my question: I currently seem to not be able to wrap my head around why this exactly works to bump the phase. Is this just an artefact of a low pass and highpass behavior, with carefully chosen frequencies, or am I missing something important here?

Any reference to read for myself would be highly appreciated, I have been looking for a while and couldn't find anything that helped me.

• Sorry I can't give detailed help but you probably want to research "all-pass" filters. You should be able to achieve a phase adjustment without a flat amplitude response. Jul 28, 2016 at 3:46
• I removed the "I'm new" and "thanks", your question is far better than 95% of the questions by new users. Well stated, with a clear schematic. Also, since it is not a forum, it is customary to keep the "fluff" to a minimum (though this has been debated over and over)
– pipe
Jul 28, 2016 at 5:09

## 2 Answers

Yes, it is just transfer function math. If you have a transfer function, you can compute its phase as well as it's gain at different frequencies. For a capacitor:

$$T(f)=I_o/V_i = \frac{1}{sC} = \frac{1}{j\omega*C}$$

Where $$j$$ is your imaginary number. It means a phase shift of 90. It's reciprocal is also -90. Suprise, surpise, in a cap, current lags voltage by ninety degrees.

For a more complex transfer function, we can compute phase as follows.

$$T(F) = V_o/V_i = \frac{1}{1+sC}= \frac{1}{1+j\omega*C}$$

Choose a capacitor value of C = 1. In this case, we see that our phase will be frequnecy dependant. Give 6.28 Hz, for convienience, this would be 1 rad/s and so:

$$\omega = 1$$

$$T(F) = V_o/V_i = \frac{1}{1+sC}= \frac{1}{1+j\omega*C} = \frac{1}{1+j}$$

$$\angle T(f) = \angle Numberator - \angle Denominator$$

$$\angle T(f) = 0 - tan(1/1) = 0-45 = -45 degrees$$

Thus this low pass filter will also introduce a lag of 45 degrees at 6.28 Hz!

After I began typing I realized that my explanation was a little math heavy. If you're unfamiliar with imaginary numbers, this is a bit of a pain. But you did say you'd worked out a transfer function. Makes sense to me though! If you'd like a specific example, feel free to ask for a walk through. Also, if it's unclear, I can always add more detail. Good luck!

From a less mathematical view, you're using a high pass and a low pass together. The high pass will lag at low frequencies, and the low pass will add lag at high frequencies. In your pass band, it won't add as much lag to this frequency, thus saving you 15 degrees.

For suggested reading, I would say calculating transfer functions, not just measuring them.

For a simple filter like this, nothing can beat the fast analytical circuits techniques or FACTs. The principle is easy. Start with $s=0$ and open all the caps. You have the dc gain (or attenuation in your case). It is simply

$H_0=\frac{R_2}{R_1+R_2}$

Then reduce the excitation or stimulus ($V_{in}$ to 0 V) and "look" at the resistance offered by the capacitors terminals when temporarily removed from the circuit. Here, as you can see in the below sketch, when $V_{in}=0\;V$, you replace the source by a short circuit and all passive elements come in //. The time constant is simply: $\tau_1=(C_1+C_2)(R_1||R_2)$. In a 1st-order system, the pole is the inverse of the time constant. So you have one pole defined as $\omega_p=\frac{1}{(C_1+C_2)(R_1||R_2)}$.

For the zero, you must find the condition for which the response becomes 0 V despite the stimulus presence when its frequency is tuned at the zero value. Here, $V_{out}$ is nulled when the impedance made of $C_1||R_2$ approaches infinity. In other words, the pole of this impedance is the zero of our network and we have $\omega_z=\frac{1}{R_1C_1}$. This is it, we have our transfer function obtained just by inspection, without writing a line of algebra!

$H(s)=\frac{R_2}{R_1+R_2}\frac{1+sR_1C_1}{1+s(C_1+C_2)(R_1||R_2)}=H_0\frac{1+\frac{s}{\omega_z}}{1+\frac{s}{\omega_p}}$

The phase bump you see is because you combine a pole which lags down to 90° with a zero leading up to 90°. If the pole and the zero are coincident, there is no bump at all. If you now spread the pole and zero apart, you start building so-called phase boost in between the pole and zero. The maximum "boost" you can get is 90°. The peak of the bump occurs at what is called the geometric mean between the pole and zero:

$f_{bump}=\sqrt{f_zf_p}$

and the phase boost peaks to $\phi_{peak}=atan(\frac{f_{bump}}{f_z})-atan(\frac{f_{bump}}{f_p})$

The below Mathcad sheet shows all the calculations:

and the dynamic response of your lead-lag compensator is here:

The active version of this lead-lag compensator is a type-2 compensator used in control system. The difference is that it adds a pole at the origin to reduce the output static error so the final transfer function is a bit different than in here. However, you still adjust the zero and pole location to provide the phase boost you need.

You have seen how the FACTs could lead you to the answer via a few sketches that you could later individually correct if you found errors in the final expression. I truly encourage engineers and students to discover and apply FACTs because once you've tried them, you won't go back to the more traditional method.

You can find an introduction to the Fast Analytical Circuits Techniques (FACTs) in a seminar taught at APEC in 2016

http://cbasso.pagesperso-orange.fr/Downloads/PPTs/Chris%20Basso%20APEC%20seminar%202016.pdf

and find a lot of exampled solved with the FACTs here

http://cbasso.pagesperso-orange.fr/Downloads/Book/List%20of%20FACTs%20examples.pdf