Thursday, February 26, 2015

Session 5 - Friday, February 13


Section 1 - Reactance of a Capacitor

Capacitors change their charge with relation to the change in voltage over time and this relationship is shown by V(t) = q(t)/C or the differentiated version, dV/dt = (dq/dt)/C. This changing charge over time is the same as current (I = C(dV/dt)) and we can think of this as the "sloshing"(changing) charge causing current to be induced in response on the other side.

If the Voltage is a sin wave we can say that V(t) = Vo*sin (w*t) and therefore I(t) = C*w*Vo*cos(wt) = Io * cos(w*t).

As these are all sine waves, there are potential phase shifts of between 0 and 90 degrees between the V(t) and I(t). This phase shift can be modeled a Vo/Io = Vo/(C*w*Vo) = 1/(w*C). We call this 1/(w*C) term the capacitive reactance and it is sometimes written as Xc. Comparing this result to the one we found in a previous lab for resistors (Vo/Io = R) we realize that the value 1/(w*C) is analogous to resistance, but with a frequency-dependent phase shift component.

A very important concept that comes from these statements is that at high frequencies capacitors act like a wire or "short circuit", and that at low frequencies they look like an "open circuit".

Integrator Revisited
When a resistor and capacitor are in series in a voltage divider we can utilize the frequency dependence of the capacitor to insure that Vout << Vin. We can do this by making Xc << R and thus insure that this integrator circuit will have an output voltage proportional to the integral of the input signal, provided that the frequency of the input is high enough to meet the requirement that w is much less than 1/(R*C).

Differentiator
Remembering that Vin(t) = Vo*sin (w*t) and I(t) = Io * cos(w*t), we can also note that dVin/dt = Vo*w*cos(w*t). If we reverse the voltage divider we created for our integrator circuit, we now have a voltage divider with a capacitor and then a resistor. If we apply the principles mentioned in the previous sentence and Ohm's Law we can show that Vout(t) = Io * cos(w*t)*R = C*w*Vo*cos(w*t)*R = R*C*(dVin/dt). This has the fascinating result that at sufficiently low frequencies, that is RC << (1/w), this circuit works as a differentiator.

An RC Differentiator, Experimentally
Lab 2-2 in the Student Manual
For this lab, we constructed an RC differentiator with a capacitor of 100pF and a resistor of 100Ω. We then drove this circuit with a square wave of 1 Vpp amplitude and frequency of 100kHz. The output is shown below:
When you zoom in in units of time on a square wave, you can see that there is actually increases on a curve. The slope of this curve is shown by our differentiator circuit and is the yellow line. This output makes sense because as the blue curve gets steeper (the slope increases) the yellow line increases, and as the blue line starts to level off (the slope decreases until it gets to zero) the yellow line decreases but does not go below zero.

We confirmed that our circuit works as expected by trying a 100kHz triangle wave. The output can be seen below:
This output makes sense because the slope of the blue line is alternating between a positive constant value and a negative constant value, which is reflected in our flat yellow line that alternates between a positive and negative value.

Trying this one more time for a sine wave we get the output seen below:
This output also makes sense because the yellow line, which represents the slope, is zero at each peak of the blue sine wave and the yellow wave has a peak each time the slope of the blue line is greatest as the blue line passes through zero. This further confirms that the circuit (yellow) is a differentiator of the input voltage (blue).

Input Impedance
As a final exercise in lab 2-2 we did a quick worst-case impedance calculation for a DC input and a input at infinite frequency. Due to the capacitor, we know that the input impedance at DC would be infinite since the capacitor acts like an open circuit, and that at infinite frequency it would be 0 since the capacitor acts like a wire.

Lab 2-3 Part 2 in the Student Manual
For this lab we are looking at the behavior of the differentiator circuit when w<< 1/(R*C) is violated. We can see the effects of breaking this condition in the outputs below for the square wave (picture) and triangle wave (video). The effect for the square wave happens because the frequency is so high that the capacitor does not have time to sufficiently charge and therefore instead of the brief peak, it is a stretched out peak that decreases gradually.
The effect for the triangle wave can best be seen when you vary the frequency of the triangle wave. In the video we manually varied the frequency from 500Hz to 100kHz, adjusting the scale of the display as needed. Just like for the square wave, these odd effects occur because the capacitor doesn't have enough time. For the triangle wave, the capacitor isn't able to charge fully to then hold its constant value for a while. It never reaches this constant value that models the slope of the input and thus it increases and decreases similarly to the input wave. You can see as this happens because the yellow line goes from the expected stair stepping, to a rounded sawtooth, to finally a triangle wave matching the input.

Filters:
Low-Pass Filter
For a circuit of two resistors set up as a voltage divider we know that if R2>> R1 then Vout ≈ Vin and  conversely, if R2 << R2 then Vout << Vin. This translates to an RC circuit set up as a voltage divider with the capacitor as the bottom half of the divider as if 1/(w*C)>> R then Vout ≈ Vin and  conversely, if 1/(w*C) < R2 then Vout << Vin. From these we know that if a frequency is low Vout ≈ Vin and if a frequency is high Vout << Vin. Therefore this circuit only passes through low frequency inputs and "kills" high frequency inputs. Thus, we call this circuit a "low-pass filter".

Complex Impedance
Since the reactance of a capacitor is similar to resistance, but isn't the same, we need a way to describe reactance that can be used in the voltage divider equation of Vout = (R2/(R1 + R2))*Vin, but also keeps track of both the amplitude and phase. The answer to this dilemma is to use complex numbers. Instead of 1/(w*C) as we were using earlier, Xc = -i/(w*C).

Now, the magnitude of the complex factor (Xc/(R + Xc)) gives the relative amplitudes of the signals for a low-pass filter voltage divider. If we graph the relative amplitudes as a function of frequency we find that the cutoff frequency which is the boundary between the frequencies that do and don't pass through the filter(approximately 70.7%) is wo = 1/(R*C) which makes sense as this is also the limiting factor of the capacitor. We will verify this later in lab 2-4.

Phase Shifts
The complex number we used for capacitance also carries information about the phase shift between Vout and Vin. Looking at just the complex part of the term gives us Vout = (1/(1+i))*Vin = ((1-i)/2)*Vin. Plotting the complex number on a complex plot shows there should be a 45 degree phase shift with Vout lagging 45 degrees behind Vin. 

Based on the fact that at low frequencies the "impedance" of the capacitor is larger than the impedance of the resistor, we know that there will be little contribution from the imaginary part of complex term and thus Vout will nearly be in phase with Vin. That is, the phase shift will be close to 0 degrees.

On the other end of this spectrum, at high frequencies the capacitor will have a much smaller impedance than the resistor. This means that the imaginary term dominates and the Vout will be near 90 degrees out of phase with Vin. Again, we will verify this with Lab 2-4.

Decibels
Decibels is the a unit for measuring the ratio of two voltages. It is defined as dB = 20*log(10, (A2/A1)). We can use decibels as another way to describe the cutoff frequency point of the low-pass filter. The cutoff frequency point has a ratio of voltages such that the signal is being attenuated by a factor of 1/(2^0.5). Expressed in decibels this is known as the 3dB point because 20*log(10, (1/(2^0.5))) = -3.01 dB

When people say things like 'beyond the cutoff the response of a low pass-filter drops at a rate of 6dB per octave', they mean that since an octave is a factor of 2 change in frequency the attenuation changes to 20*log(10, 2). This evaluates to 6.02 and thus is called a 6dB drop rate per octave.

Low-Pass Filters, Experimentally
Lab 2-4 in the Student Manual
For this lab we constructed a low-pass filter out of a 15kΩ resistor and a 0.01 microFarad capacitor. We calculated the filter's 3dB frequency to be 1061.03 Hz (w = 1/RC = 1/(15k * 0.1 micro) = 6666.6, f = w/(2*pi) = 6666.6/(2*pi) = 1061.03). We then drove this circuit with a sine wave ranging from 1kHz and 10kHz to observe how the high frequencies were cut out by the low-pass filter and the signal became heavily attenuated. 

We then found the 3dB frequency point experimentally by finding the frequency at which the filter  attenuated the Vout down to 70.7% of its full amplitude. We found this value to be 1.2 kHz which is very close to our calculated value of 1.06 kHz. 

Then we found the limiting phase shift at very low frequencies to be 0 degrees, and the phase shift at high frequencies to be approximately 90 degrees, confirming the findings above in Phase Shifts.

We also measured the output, frequency, and phase shift at 2, 4, and 10 times f3dB to make sure that the low-pass filter was attenuating 6dB per octave. The input voltage was 1 V. The results are below:
Frequency in f3dB
Frequency in kHz
Amplitude in mV
Attenuation in dB
(20*log(10, Vout/Vin)
Phase shift in microseconds
Phase shift in degrees
(phase shift in seconds/period)*360
2
2.4
448
6.9
78
67
4
4.8
252
12.
49
85
10
12
110
19
21
90.7

These results confirm that the attenuation is approximately 6dB per octave (note that 4.8kHz to 12kHz is not an octave jump) and that the phase shift approaches 90 as we increase the frequency (going over 90 is probably an error in measurement).

High-Pass Filter
A high-pass filter is the opposite of a low-pass filter. The positions of the capacitor and resistor are swapped and the high-pass filter attenuates low frequency signals while passing along high frequency signals and the cutoff frequency is still 1/(R*C).

High-Pass Filters, Experimentally
Lab 2-5 in the Student Manual
For this lab we constructed a high-pass filter out of a 15kΩ resistor and a 0.01 microFarad capacitor. We calculated the filter's 3dB frequency to be 1061.03 Hz, same as the previous low pass circuit. Although this time we experimentally found the 3dB frequency to be 1kHz. We then drove this circuit with a sine wave ranging from 500Hz and 10kHz to observe how this circuit passed along the high frequencies, while the low frequency signal became heavily attenuated. 

We then checked that the output frequencies at low frequencies well below the 3dB point (1/2, 1/4, and 1/10 times f3dB) were proportional to frequency. The input voltage was 1 V and the results are below:
Frequency in f3dB
Frequency in Hz
Amplitude in mV
1/2
500
448
1/4
250
240
1/10
100
112

We can see that the output is in fact proportional to frequency as the amplitude in mV is the same fraction of the original 1 V as the frequency fraction.

The limiting phase shift for this circuit is 90 degrees at very low frequencies and 0 degrees at very high frequencies.

Garbage Detector
Lab 2-6 in the Student Manual
This lab combines a high-pass filter with with a transformer to show you the high frequency "garbage" that comes with the 110-volt power line. Since this is the same circuit as the lab before, but now with an added transformer, we know that the calculated 3dB frequency is 1061Hz, and we confirmed this with a measured 3dB of 1kHz. To find the filter's attenuation at 60 Hz we counted octaves to make the arithmetic easier. 1kHz -> 500Hz -> 250 Hz -> 125 Hz -> 62.5Hz is 4 octave changes. The voltage at 1kHz will be 70.7% of the total 6.3V provided by the transformer, since it is the cutoff frequency. A 4 octave change means that the fraction of the original voltage is 1/(2^4) or 1/16. Thus, the attenuation at 60 Hz is (0.707 * 6.3)/16 = 0.28 V.

Blocking Capacitor
Since capacitors act as an open circuit for direct current and are closer to a short circuit for alternating current, a capacitor can be used to take in a varying voltage and block the DC component.

Blocking Capacitor, Experimentally
Lab 2-8 in the Student Manual
In this lab, we added a 10kΩ resistor and +5V source from our Arduino chip, to a high-pass filter consisting of a 4.7 microFarad capacitor and a 4.7kΩ resistor. Driving the high-pass filter with the function generator and looking at the output on the oscilloscope on the DC coupling setting, we can see the AC signal "riding" on +1.6V which comes from the voltage divider giving a third of the 5 volts from the Arduino.

Now we add another high-pass filter to the output of our previous circuit. This time the high-pass filter added consists of a 4.7 microFarad capacitor and a 100kΩ resistor. The low frequency limit for this blocking circuit is 0.34 Hz (wo = 1/(R*C) = 1/(100k * 4.7 micro) = 2.13, wo/(2*pi) = f = 2.13/(2*pi) = 0.34 Hz).

We will explore the applications of this circuit in the next lab.

No comments:

Post a Comment