You are on page 1of 7

Fall 2017 Lab 6 – Dynamic Response Lab 6-1

Lab 6 – Dynamic Response

Format
This lab will be conducted during your regularly scheduled lab time in a group format. You may
ask the lab instructors for assistance if needed, but successful completion of the lab is your
responsibility.

Report
An individual, formal report is due from each student on Friday, November 3, at the beginning
of class. Reports will be considered late starting at the beginning of class and will be penalized a
full letter grade for every 24-hour period that they are late.

Background
A solid understanding of dynamic response is important for mechanical engineers. Measures of
dynamic response include
- time constant (1st-order systems),
- natural frequency and damping ratio (2nd-order systems; not covered in this lab), and
- bandwidth (any order system).

Of course, in order to evaluate a system’s dynamic response, it is first necessary that the time-
response be captured. To that end, some data acquisition system must be implemented. You will
accomplish the following tasks during the course of this laboratory:
I. Evaluation of time-constant for a first order system by observing the transient response
You will construct a basic RC circuit on your breadboard. You will then drive this
system with a square wave. Voltage followers will be used to buffer both the input
signal coming from the function generator and the voltage output of the RC circuit. The
two signals will also drive LEDs on your breadboard, such that you may directly (with
your own eyes!) observe (see!) the influence of a system’s time-constant on its output.
II. Evaluation of bandwidth for a first order system by observing the steady state response
Bandwidth is defined as the frequency at which an output signal drops below 70.7% of
the “low frequency” output. This will be further explained below. You will use sine
signals to drive the circuit constructed in Part I. You will record the input and output
signals, such that you will later be able to determine the signals’ magnitudes and the
corresponding phase shift between the two signals. In addition, you will visually
observe the influence of the signals’ magnitude and phase response using the LEDs on
the breadboard.
Fall 2017 Lab 6 – Dynamic Response Lab 6-2

I. Evaluation of time-constant for a first order system by observing the transient


response
As discussed in class, common first-order systems include (among others) a mass sliding on a
viscous surface, a thermal “mass” immersed in different fluids, and basic RC circuits. Of
those three systems, the easiest to construct and test is the RC circuit. To that end, you will be
constructing an RC circuit on your laboratory station breadboard. To prevent loading of the
circuit, you will use load followers to buffer the input and the output signals. You will also
use the load followers to simultaneously drive LEDs such that you will be able to visually
interpret the input and output signals. The circuit that you need to construct is shown in
Figure 1 below. In that figure, the input signal, V in , is indicated on the intput to the first load
follower and the output signal, V out , is the output of the second load follower. The dashed
box around the four LEDs is meant to imply that the LEDs are part of the “bar graph” LED
chip that was used during the A/D laboratory earlier this semester. The middle two LEDs are
used to indicate the status of the input signal (one will be fully on when the input signal is
+5V and the other will be fully on when the input signal is -5V). The outer two LEDs
correspond to the output signal, one for positive voltages and one for negative voltages. (In
fact, 0.7V is the minimum voltage to drive an LED, so the LEDs will not be lit for voltages
between ± 0.7V.) Also note: the ±12V rail voltages for the op-amps are not shown, but they
are necessary.

220Ω
220 Ω
-
-
+
+ +
680kΩ
156kΩ Vout
+
Vin 0.1µF 0.1µF -
0.1µF
-

Figure 1. RC circuit with indicating LEDs.

To help you in understanding the circuit, a “Fritzing” breadboard layout of the circuit is
shown in Figure 2. Note that (a) you will be using only four of the ten LEDs on the LED chip
and (b) in Figure 2, some of the LEDs are shown red and some are white; for the chips used
in lab, all LEDs are red. Also, there is a blue “Chiclet” shown connecting the non-inverting
input of the second op-amp and GND. That is the capacitor that, in the laboratory, will be a
deep red color (and will look even more like a Chiclet – don’t eat it). Finally, in Figure 2,
only one capacitor is shown. However, in the lab, you will be using a pair of 0.1µF capacitors
in parallel, to realize an equivalent capacitance of 0.2µF.

As you go through this first part of the lab, you will be evaluating the sytem’s time-constant
for various combinations of resistors and capacitors. To that end, you should record all
resistance and capacitance values in the table shown at the end of this section of the lab. In
addition, you should record time-histories of the signals using Waveforms and the ‘Scope
software.
Fall 2017 Lab 6 – Dynamic Response Lab 6-3

Ch1
Ch a0 Ch2
Ch a1

+12V
+5V

GND
-12V

Function Generator Signal


Figure 2. Breadboard layout of RC circuit.

1. Construct the circuit shown in Figures 1 and 2. Use the DMM to measure the resistances
of the 680kΩ resistors and the capacitance of the 0.1µF capacitor. RECORD these
values.
2. Test the circuit by MOMENTARILY connecting the +5V rail signal to the non-inverting
input (pin 3) of the first op-amp. When you do that, the left two LEDs should light up.
REMOVE the +5V rail signal before moving to the next step.
3. Use the Waveforms function generator to generate a 2.5 Hz square wave with an
amplitude of ± 5V.

To get the Waveforms function generator up and running, do the following:


- Start Waveforms by double-clicking on the appropriate shortcut on your lab station
PC’s desktop.
- Select “Wavegen” from the menu on the left side of the Waveforms window.
- Change the waveform type to “Square” by using the dropdown menu that is initially
labeled “Sine.”
- Change the frequency and amplitude to 0.5Hz and 5V, respectively, by using the
appropriate text-entry boxes.
- Start the signal output by clicking on the “Run” button.
- Start the oscilloscope function of Waveforms by selecting “Windows,” then
“Waveforms,” and selecting “Scope” from the menu on the left side of the
Waveforms window.
4. Check the square wave with the oscilloscope to make sure that the signal has a zero mean
(goes from +5V down to -5V) and that its frequency is 0.5 Hz.
5. Apply the square wave to the input of the circuit shown above. If your circuit is working
properly, the left two LEDs should be lighting together and the right two LEDs should be
lighting together. The two pairs should be alternating as the square wave goes positive
and negative (left-left, then right-right, then left-left, etc.). IT IS IMPORTANT THAT
Fall 2017 Lab 6 – Dynamic Response Lab 6-4

SCOPE CHANNEL 2 BE CONNECTED TO THE OUTPUT OF THE SECOND LOAD


FOLLOWER, NOT THE INPUT. OTHERWISE, LOADING WILL OCCUR AND YOU
WON’T GET THE FULL AMPLITUDE OF THE OUTPUT.
6. Use Waveforms to monitor the input and output signals as measured on Channels 1 and
2. The two signals should look like those shown in Figure 3 below. Do you see a pattern
in how the individual pairs of LEDs light? (Does one LED always turn on a little bit
faster than the other in a given pair?) RECORD the input and output signals at a
sufficient sampling rate and for a sufficient time that you will be able to estimate the
time-constant of the system. That is, it would be difficult to estimate the time-constant of
the system using the figure below. However, if you change the system to 250ms/div, or
even 100ms/div, you will be able to zoom in on a single rising portion of the signal and,
as such, make a better estimate of the time-constant.
7. To make the best estimate of the time-constant, save your data using the “File,” and
“Export” options. You can then bring up the .csv (comma-separated) file in Excel. SAVE
THIS DATA.

Figure 3. Input square wave and RC output with 200kΩ resistor and 0.1µF capacitor.

8. Modify your circuit by adding a second 0.1µF capacitor in parallel with the first one.
RECORD this second capacitor’s capacitance. Keep applying the 2.5Hz square wave.
Again, visually observe the response of the outer LEDs (describe how they light) and
RECORD the time response using Waveforms and with a time/div value that will allow
you to estimate the time-constant in Excel.
9. Now, remove the three capacitors and replace them with a single 0.01µF capacitor.
Record that capacitor’s value. Then repeat the observations and time response recording
of Step 8, modifying the time/div value as appropriate.

For each test, record the resistance and capacitance of any circuit elements and the time
response at a time/div level that will make for an accurate estimation of the time constant.
Fall 2017 Lab 6 – Dynamic Response Lab 6-5

Outside of lab:
Write a description of how the LED turns on and off during the different circuit cases listed
above. Support your observations with plot(s) of the input and output signals. Explain why the
differences occur, in terms of the components used. Your explanation should be quantitative, as
well as qualitative (some math should be involved).

Calculate the theoretical time-constants for the different systems using the appropriate resistor
and capacitor values that you recorded above. Then calculate the time-constant of your
experimental sytem using the time-records of the input and output signals. Compare the two
time-constants. When you include uncertainty in all measurements, do the time-constants
overlap? (Uncertainties should include resistance and capacitance values for the theoretical time
constant and uncertainties due to sampling for the experimental time constant.)
Write a description of how the LEDs light up and use your knowledge of the system time-
constants to explain the particular pattern that can be observed.

Table 1. Data for evaluation of time-constant.


Case R (kΩ) C1(µF) C2(µF) C2(µF) τ th (s) τ exp (s)
R=200Ω, C=0.1µF
R=200kΩ, C=2x0.1µF
R=200Ω, C=0.01µF

Change roles in your group at this point.


Fall 2017 Lab 6 – Dynamic Response Lab 6-6

II. Evaluation of Bandwidth for a first order system by observing the steady state
response
1. Put your system back to the original configuration of the 680kΩ resistor and the 1µF
capacitors in parallel. Switch the function generator output to provide a 0.05 Hz sine
wave with a 5V amplitude (10V peak-to-peak). Check that your signal is zero-mean using
the oscilloscope.
2. Use Waveforms to record at least four full periods of the input and output signals. Make
sure that the sampling rate is sufficiently high to allow for a good estimation of the two
signals’ magnitudes, as well as any time delay between the two signals. The time delay
will be used to estimate the phase difference between the two signals. You may want to
examine your data in Excel, to be sure that you can predict the amplitudes of the input
and output signals and the phase lag. Carefully observe the lighting patterns (again) and
consider how the recorded data supports the lighting patterns.
Note – you may be seeing a “dead-band” between when one pair of LEDs turns
off and the other pair has not yet turned on. Do you know why it is there?
Consider that an LED doesn’t start to conduct until 0.7V is applied and you will
probably figure it out.
3. Now, increase your frequency to 0.1Hz and repeat Step 2. You may need to adjust your
sampling rate to accommodate the faster signal (faster in the sense that corn syrup flows
faster than molasses – they’re still both slow).
4. Repeat Step 2 for frequencies of 0.2 Hz, 0.5 Hz, 0.75 Hz, 1 Hz, 1.25 Hz, 1.5 Hz, 2 Hz, 4
Hz, 8 Hz, 16 Hz, 64 Hz, 256 Hz, 1 kHz and 2 kHz. Record input and output signals at all
frequencies and adjust the sampling rate to ensure that you capture sufficient data to
accuractly estimate the amplitudes of the two signals and the phase differences between
them. As the frequency gets higher, you should carefully examine the LEDs. What is
happening to the LEDs corresponding to the output signal? Be prepared to explain this in
your results. When finished, you should have input and output records for each of the
following frequencies so that you can fill in Table 1 below. Make sure that, for each
frequency, you capture the data at a sufficient rate to be able to estimate the
amplitudes and phase accurately!

Outside of lab:
Fill in Table 1 shown below. The linear gain is the ratio of the output amplitude divided by the
input amplitude. The dB gain is 20*log10(G), where G is the linear gain. To calculate the phase
angle, define t in as the time that the input signal passes through 0V and t out as the time that the
output signal next passes through that same value. The time lag between the two signals is then
defined as dt=t out -t in . Divinding dt by the period of the signals, T, gives the time lag as a fraction
of the full period. Since one full period corresponds to 360°, you can multiply the result by 360°
(t − t )
to get the phase lag. That is, the phase lag, φ, is given by φ = out in ∗ 360 .
T

Next, create four plots of the frequency response in either MATLAB or Excel. The first plot
should be a plot of the linear gain vs. linear frequency (gain on the vertical axis and frequency on
the horizontal). The second plot should be the phase vs. linear frequency. For the third and fourth
plots, the horizontal axes should be frequency, but the axes should use a logarithmic scale. The
Fall 2017 Lab 6 – Dynamic Response Lab 6-7

vertical axis of the third plot should then be the gain in dB. The vertical axis of the fourth plot
should be the phase in degrees (as in the second plot).

The bandwidth of a dynamic system is defined as the frequency at which the output amplitude
drops to 70.7% of the level at “low” frequencies. Also, for a first-order system, the bandwidth is
determined by the frequency at which the phase lag between the input and output goes to 45°.
Use your third and fourth frequency response plots to estimate the bandwidth of your system.
1
Finally, for a first-order system, the bandwidth is also given by the formula ωbw = , where τ is
τ
the system’s time constant. In this case, τ is given by the product RC. So, calculate the theoretical
bandwidth based on the RC time-constant and compare this to the bandwidth as evaluated above.
In all, you will have three separate methods for calculating the system’s bandwidth.

Write a description of the LED lighting behavior at the different frequencies. Can you relate the
lighting behavior to the frequency response of the system as presented in your four plots? Think
about the implications of magnitude and phase as functions of frequency and how they are
manifest in the lighting behavior.

Table 2. Frequency response data and results.


Frequency Frequency Input Amp. Output Amp. Gain Gain Phase lag
(Hz) (rad/s) (V) (V) (linear) (dB) (deg)
0.05
0.1
0.2
0.5
0.75
1
1.25
1.5
2
4
8
16
64
256
1000
2000