This post is a continuation of the previously published article, “How to get a digital IIR filter from an analog or how to “invent” a digital IIR filter.” At the end of that article I promised you to show how to get the amplitude and phase responses i.e. frequency response of the filter. Holding back my promise…
The derivation of the frequency response is possible at least by 2 ways (perhaps other ways I just do not know). Deduction of the final formula in both cases trivial, but in one of them, we should have some minimal knowledge of the course “Theory of electrical circuits”. Well, in the other one we need to know the Laplace transform, which we have already used in the previous article. We will consider both methods. In order not to confuse the reader, 2 ways to obtain the final equation will be presented in two different articles. It would be logical to start with the method which is based on the Laplace transform. In the previous article the following formula was obtained:

\frac{Y(s)}{X(s)}=\frac{1}{1+s\tau}, где \tau=RC

Even in the previous article, I did focus on this expression with the following words: “The resulting ratio of the images can be viewed as the ratio of the output spectrum (of the exponential oscillograms) to the input spectrum (of the exponential oscillograms).” In other words, I wanted to tell the reader that this is the formula is of a kind of response. The entire catch is that this response from the complex variable s. Yes, this response is actually used by engineers and gives a lot of benefits, but it has to be plotted on the complex s-plane and for the beginners can be a little difficult and frightening. Therefore, in this paper we will not consider the frequency response of a complex variable s. We will consider the usual kind of response as a function of the amplitude of the output filter (axis Y) versus frequency (axis X). To get “normal” response from the “frequency response of a complex variable” we should perform the substitution of  j\omega instead of complex variable s.


But why change a complex variable to another? – You ask. The answer is simple. We want to get a formula that will depend only on one variable (frequency). The expression in the initial form contains two variables embedded in the complex variable s (frequency and damping coefficient). Let us assume that all is clear for you. Simply making the substitution:

K(s)=\frac{1}{1+sRC}{,=> }K(j\omega)=\frac{1}{1+j{\omega}RC}=\frac{1{\cdot}(1-j{\omega}RC)}{(1+j{\omega}RC){\cdot}(1-j{\omega}RC)}=\frac{1}{1+({\omega}RC)^2}-j\frac{{\omega}RC}{1+({\omega}RC)^2}

As can be seen I deliberately singled out real and imaginary parts in the final result. We consider real signals, the real world and it would be logical to get response from the real frequency. It’s enough to take an absolute value of a complex number:


After simplification we get:


The resulting expression is nothing else but real frequency response of the RC low-pass filter! The drawing of the amplitude response is:

Rendered by

From this plot can be concluded that the higher the frequency of the test signal at the input of the filter, the more it will be attenuated on its output, i.e. low-pass filter will not pass the high frequency and pass low.

Well, now the turn of the phase response:


After reduction we obtain:


Phase response can be represented graphically as follows:

Rendered by

This graph shows that the higher the frequency of the signal at the input of the filter, the more it will be distorted (delayed) in phase (DC component is not distorted in phase distortion). Exactly because of this property of infinite impulse response IIR filters becomes not so attractive. But that’s another story…

Well, in this article we have considered the first method of obtaining frequency response of the RC low-pass filter using the Laplace transform. As a result the expression which describes frequency response (amplitude from frequency and phase from frequency dependencies) was obtained. In the next article from a series of articles on DSP we will consider the second method of producing the same formulae. Good luck to you in the discovering of the digital world!

P.S. Interesting fact that for the different languages we have different shortcuts for this king of filter. In English language it is LPF (low-pass filter) but in Russian it is ФНЧ. If to translate ФНЧ into English word-by-word it would be Filter of Low Frequencies which is meaningless :) What it should mean? It filters low, or filters high frequencies? Only God knows :) But in English language things go better and we shouldn’t worry about meaning because it is could be taken from the name!