# Examples of Continuous-Time Filters Described by Differential Equations

This is a continuation from the previous tutorial - filtering.

In many applications, frequency-selective filtering is accomplished through the use of LTI systems described by linear constant-coefficient differential or difference equations. The reasons for this are numerous.

For example, many physical systems that can be interpreted as performing filtering operations are characterized by differential or difference equations. A good example of this that we will examine in later tutorials is an automobile suspension system, which in part is designed to filter out high-frequency bumps and irregularities in road surfaces.

A second reason for the use of filters described by differential or difference equation sis that they are conveniently implemented using either analog or digital hardware. Furthermore, systems described by differential or difference equations offer an extremely broad and flexible range of designs, allowing one, for example, to produce filters that are close to ideal or that possess other desirable characteristics.

In this and the next tutorials, we consider several examples that illustrate the implementation of continuous-time and discrete-time frequency-selective filters through the use of differential and difference equations.

In later tutorials, we will see other examples of these classes of filters and will gain additional insights into the properties that make them so useful.

## 1. A Simple RC Lowpass Filter

Electrical circuits are widely used to implement continuous-time filtering operations. One of the simplest examples of such a circuit is the first-order RC circuit depicted in Figure 3.29, where the source voltage $$v_\text{s}(t)$$ is the system input.

This circuit can be used to perform either a lowpass or highpass filtering operation, depending upon what we take as the output signal.

In particular, suppose that we take the capacitor voltage $$v_\text{c}(t)$$ as the output. In this case, the output voltage is related to the input voltage through the linear constant -coefficient differential equation

$\tag{3.141}RC\frac{\text{d}v_\text{c}(t)}{\text{d}t}+v_\text{c}(t)=v_\text{s}(t)$

Assuming initial rest, the system described by eq. (3.141) is LTI. In order to determine its frequency response $$H(j\omega)$$, we note that, by definition, with input voltage $$v_\text{s}(t)=e^{j\omega{t}}$$, we must have the output voltage $$v_\text{c}(t)=H(j\omega)e^{j\omega{t}}$$. If we substitute these expressions into eq. (3.141), we obtain

$\tag{3.142}RC\frac{\text{d}}{\text{d}t}[H(j\omega)e^{j\omega{t}}]+H(j\omega)e^{j\omega{t}}=e^{j\omega{t}}$

or

$\tag{3.143}RCj\omega{H}(j\omega)e^{j\omega{t}}+H(j\omega)e^{j\omega{t}}=e^{j\omega{t}}$

from which it follows directly that

$\tag{3.144}{H}(j\omega)e^{j\omega{t}}=\frac{1}{1+RCj\omega}e^{j\omega{t}}$

or

$\tag{3.145}{H}(j\omega)=\frac{1}{1+RCj\omega}$

The magnitude and phase of the frequency response $$H(j\omega)$$ for this example are shown in Figure 3.30. Note that for frequencies near $$\omega=0$$, $$|H(j\omega)|\approx1$$, while for larger values of $$\omega$$ (positive or negative), $$|H(j\omega)|$$ is considerably smaller and in fact steadily decreases as $$|\omega|$$ increases. Thus, this simple RC filter (with $$v_\text{c}(t)$$ as output) is a nonideal lowpass filter.

To provide a first glimpse at the trade-offs involved in filter design, let us briefly consider the time-domain behavior of the circuit. In particular, the impulse response of the system described by eq. (3.141) is

$\tag{3.146}h(t)=\frac{1}{RC}e^{-t/RC}u(t)$

and the step response is

$\tag{3.147}s(t)=[1-e^{-t/RC}]u(t)$

both of which are plotted in Figure 3.31 (where $$\tau=RC$$).

Comparing Figures 3.30 and 3.31, we see a fundamental trade-off.

Specifically, suppose that we would like our filter to pass only very low frequencies. From Figure 3.30(a), this implies that $$1/RC$$ must be small, or equivalently, that $$RC$$ is large, so that frequencies other than the low ones of interest will be attenuated sufficiently.

However, looking at Figure 3.31(b), we see that if $$RC$$ is large, then the step response will take a considerable amount of time to reach its long-term value of 1. That is, the system responds sluggishly to the step input.

Conversely, if we wish to have a faster step response, we need a smaller value of $$RC$$, which in tum implies that the filter will pass higher frequencies.

This type of trade-off between behavior in the frequency domain and in the time domain is typical of the issues arising in the design and analysis of LTI systems and filters and is a subject we will look at more carefully in later tutorials.

## 2. A Simple RC Highpass Filter

As an alternative to choosing the capacitor voltage as the output in our RC circuit, we can choose the voltage across the resistor. In this case, the differential equation relating input and output is

$\tag{3.148}RC\frac{\text{d}v_\text{r}(t)}{\text{d}t}+v_\text{r}(t)=RC\frac{\text{d}v_\text{s}(t)}{\text{d}t}$

We can find the frequency response $$G(j\omega)$$ of this system in exactly the same way we did in the previous case: If $$v_\text{s}(t)=e^{j\omega{t}}$$, then we must have $$v_\text{r}(t)=G(j\omega)e^{j\omega{t}}$$; substituting these expressions into eq. (3.148) and performing a bit of algebra, we find that

$\tag{3.149}G(j\omega)=\frac{j\omega{RC}}{1+j\omega{RC}}$

The magnitude and phase of this frequency response are shown in Figure 3.32. From the figure, we see that the system attenuates lower frequencies and passes higher frequencies—i. e., those for which $$|\omega|\gg1/RC$$—with minimal attenuation. That is, this system acts as a nonideal highpass filter.

As with the lowpass filter, the parameters of the circuit control both the frequency response of the highpass filter and its time response characteristics.

For example, consider the step response for the filter. From Figure 3.29, we see that $$v_\text{r}(t)=v_\text{s}(t)-v_\text{c}(t)$$. Thus, if $$v_\text{s}=u(t)$$, $$v_\text{c}(t)$$ must be given by eq. (3.147). Consequently, the step response of the highpass filter is

$\tag{3.150}v_\text{r}(t)=e^{-t/RC}u(t)$

which is depicted in Figure 3.33.

Consequently, as RC is increased, the response becomes more sluggish—i.e., the step response takes a longer time to reach its long-term value of 0. From Figure 3.32, we see that increasing RC (or equivalently, decreasing $$1/RC$$) also affects the frequency response, specifically, it extends the passband down to lower frequencies.

We observe from the two examples in this tutorial that a simple RC circuit can serve as a rough approximation to a highpass or a lowpass filter, depending upon the choice of the physical output variable.

A simple mechanical system using a mass and a mechanical damper can also serve as a lowpass or high pass filter described by analogous first-order differential equations.

Because of their simplicity, these examples of electrical and mechanical filters do not have a sharp transition from passband to stopband and, in fact, have only a single parameter (namely, $$RC$$ in the electrical case) that controls both the frequency response and time response behavior of the system.

By designing more complex filters, implemented using more energy storage elements (capacitances and inductances in electrical filters and springs and damping devices in mechanical filters), we obtain filters described by higher order differential equations. Such filters offer considerably more flexibility in terms of their characteristics, allowing, for example, sharper passband-stopband transition or more control over the trade-offs between time response and frequency response.

The next tutorial introduces examples of discrete-time filters described by difference equations.