# Lab 7: Frequency Response & FIlters

## 1. Objectives

By the end of this laboratory session students should be able to:

- Measure the frequency response of a circuit
- Measure the cutoff frequency of a filter
- Design a filter given the cutoff frequency

## 2. Background

Resistors and capacitors are circuit elements that impede current flow. Ohm’s law is \(\Delta v = iZ\), and says that the voltage across an element is equal to the current through the element times the impedance of the element. Current can be direct current (dc), which has a frequency of 0 Hz, or it can be alternating current (ac) with a frequency of >0—\(\infty\) Hz. Resistors impede current flow the same amount for any frequency. Their value of impedance is constant regardless of frequency (i.e., it is always R). The impedance of a capacitor is dependent on the frequency of current through it. Its value of impedance is 1/(\(j\omega C\)), where \(C\) is the capacitance value expressed in farads (F) and \(\omega = 2 \pi f\) is the frequency in rad/s and \(f\) is the frequency in cycles/s (Hz). Because a capacitor’s impedance varies with frequency, we can use it to make a filter. A filter is a circuit that attenuates (reduces the amplitude of) some frequencies but not others.

The corner frequency, or cutoff frequency, of a passive RC filter can be calculated with \(f_c = 1/{2\pi RC}\).

The corner frequency is the point at which the amplitude is -3 dB less than the peak value. Decibels (dB) are used to measure power. -3 dB is equivalent to 0.707 of the passband voltage.

A Bode plot, can be used to show frequency response graphically. Reference sections 16.6–7 in the textbook (Hayt et al.) for more information on Bode plots.

Filters built with resistors and capacitors are called passive filters. In a passive low-pass filter, the output voltage \(v_{out}\) is measured across the capacitor. The cutoff frequency is \(f_c = 1/{2\pi RC}\).

In a passive high-pass filter, the output voltage \(v_{out}\) is measured across the resistor. As with the low-pass filter, the cutoff frequency is \(f_c = 1/{2\pi RC}\).

Op-amps, resistors, and capacitors can be used to build active filters. Active filters can attenuate *and* amplify signals. The corner frequencies of an active filter are also calculated with the formula \(f_c=^{1}⁄_{2}\pi RC\). However, since active filters also have gain, the gain must be calculated using the formula \(v_{out}/v_{in}=-R_2/R_1\).

Notice the only difference between the filters is the position of the capacitor. The gain and cutoff frequency formulas remain the same.

## 3. Laboratory Equipment

- Resistors
- Capacitors
- Op-amps
- Oscilloscope
- Function generator

## 4. Procedure

### 4.1. Passive filter

Construct the following circuit.

Configure the function generator to provide a sine wave with 2 \(\mathrm{V_{pp}}\) amplitude at 10 kHz. Attach an oscilloscope probe across \(v_s\) and measure the amplitude. Adjust the function generator amplitude until the oscilloscope reads 2 \(\mathrm{V_{pp}}\).

Attach an oscilloscope probe across the capacitor to measure \(v_\mathrm{c}\).

Measure and record the amplitude of \(v_\mathrm{s}\) and \(v_\mathrm{c}\).

Repeat step 4 with input frequency values of 5 kHz, 1 kHz, 500 Hz, 100 Hz, and 50 Hz. Make sure to verify that the input voltage is 2 \(\mathrm{V_{pp}}\) each time. The function generator may output a slightly different voltage when you adjust the frequency.

Empirically determine and record the cutoff frequency for your circuit. Change input frequency until \(v_\mathrm{c}=0.707\times\)Maximum passband amplitude.

### 4.2. Active filter

Construct the circuit shown below. Your TA will provide the op-amp chip.

Configure the function generator to provide a sine wave with 2 \(\mathrm{V_{pp}}\) peak-to-peak amplitude at 10 kHz. Attach an oscilloscope probe across \(v_\mathrm{in}\) and measure the amplitude. Adjust the function generator amplitude until the oscilloscope reads 2 \(\mathrm{V_{pp}}\).

Attach an oscilloscope probe between \(v_\mathrm{out}\) and ground to measure \(v_\mathrm{out}\).

Measure and record the amplitude of \(v_\mathrm{in}\) and \(v_\mathrm{out}\).

Repeat step 4 with input frequency values of 5 kHz, 1 kHz, 500 Hz, 100 Hz, and 50 Hz. Make sure to verify that the input voltage is 2 \(\mathrm{V_{pp}}\) each time. The function generator may output a slightly different voltage when you adjust the frequency.

Empirically determine and record the cutoff frequency for your circuit. Change input frequency until \(v_\mathrm{out}=0.707\times\)Maximum passband amplitude.

Using data from Step 5 empirically determine the passband gain of your circuit.

## 5. Results

- Enter the data from step 5 in Section 4.1. in a table. Use three columns: one for \(v_\mathrm{s}\), one for \(v_\mathrm{c}\), and one for \(v_\mathrm{out}/v_\mathrm{in}\).
Simulate the circuit in Section 4.1. in Multisim (see section 9-9 Spectral Response in the Multisim handout). Use Multisim to generate two frequency response plots:

a. \(v_\mathrm{out}\) vs. \(f\) (Hz)

b. \(|v_\mathrm{out}/v_\mathrm{in}|\) vs. \(f\) (Hz)—in other words a Bode plot.The Bode Plot can be generated from the AC Analysis with the x-axis set to “Decade” and the y-axis set to “Decibel”. Be sure to check the AC Analysis Voltage of the circuit source before proceeding.

Include these plots in your lab report

**and**a screen shot of your Multisim circuit in your report.Calculate cutoff frequency using component values for the circuit in Section 4.1. Compare your calculations with your empirical value.

How does the output the signal amplitude change as frequency increases?

Enter the data from step 5 in Section 4.2. in a table. Use three columns: one for \(v_\mathrm{in}\), one for \(v_\mathrm{out}\), and one for \(v_\mathrm{out}/v_\mathrm{in}\).

Calculate gain and the cutoff frequency using component values for the circuit in Section 4.1. Compare your calculations with your empirical values.

How does the signal amplitude change as frequency increases?

Simulate the circuit in Section 4.1. in Multisim and use Multisim to generate two frequency response plots: a. \(v_\mathrm{out}\) vs. \(f\) (Hz) b. \(|v_\mathrm{out}/v_\mathrm{in}|\) vs. \(f\) (Hz)

Include these plots in your lab report

**and**a screen shot of your MULTISIM circuit in your report.NOTE: Press the

`Run Interactive Simulation`

(the green arrow) BEFORE opening the Bode Plotter, and you should be able to achieve the desired plot. This should prevent Multisim from crashing.