ELEC 241 Lab

Interlude

Measuring the Transfer Function

Computing and plotting the expected transfer function of an RC circuit is easy: just use Matlab. When it comes time to measure the actual transfer function in the lab, things are a bit harder.

One obvious difficulty is that instead of simply making the measurement at a single frequency (e.g. zero), we have to make it at all frequencies, a rather daunting task. Fortunately, the function we expect to get is well behaved, so a few judiciously chosen frequencies should suffice.

The other problem is that we have to measure both the magnitude and the phase of the input and output signals. We already know how to measure magnitude. Let's see if we can figure out how to measure phase.

We will use the following technique:

  1. Connect the function generator to the input of the system being measured:
    \includegraphics[scale=0.650000]{freq_resp.ps}
  2. Connect CH1 of the scope to $v_{in}$ and CH2 to $v_{out}$ .
  3. Set the V MODE switch to DUAL (CHOP).
  4. Set both AC-GND-DC switches to DC. In a case where there is a DC offset on either the input or the output, you will have to set the corresponding switch to AC. If you do so, be aware that this will influence the low frequency portion of the measurement (below about 20 Hz).
  5. Set the function generator AMPLITUDE control to zero. Use the POSITION controls to align both traces with the X-axis.
  6. Set the function generator frequency to the first frequency to be measured, say $f_1$ . Set the function generator AMPLITUDE control to give a convenient number (e.g. 1 or 2 volts) for the amplitude of $v_{in}$ .
  7. Adjust the VOLTS/DIV, TIME/DIV, horizontal POSITION, and trigger LEVEL controls until the display looks similar to this:
    \includegraphics[scale=0.650000]{phase.ps}
    In particular, you should have just over one cycle of the input waveform displayed, and it should cross the X-axis at the leftmost vertical division.

Let's see what we've got:

  1. By measuring the height of the peaks of CH1 we get $\vert V_{in}\vert$ .
  2. Similarly, the peaks of CH2 give $\vert V_{out}\vert$ .
  3. Calculate $\displaystyle \vert H(f_1)\vert = \frac{\vert V_{out}\vert}{\vert V_{in}\vert}$ .
  4. Measure $t'$ , the distance between successive zero crossings of the same slope. This zero crossing corresponds to $\sin(2\pi f_1 t)=0$ for $v_{in}$ and $\sin(2\pi f_1 t' + \phi)=0$ for $v_{out}$ , where $\phi = \angle H(f_1)$ . So we have $2\pi f_1 t' + \phi = 0$ or $\phi = -2\pi f_1 t' = -2\pi t'/T$ , where $T$ is the period of the waveform. This gives the phase in radians. To the the phase in degrees, we would use:
    $\displaystyle \angle H(f_1) = -360\frac{t'}{T}$

This gives us the magnitude and angle of the transfer at a single frequency, $f_1$ . To get the complete transfer function, we repeat the procedure at our "judiciously chosen" frequencies.