Link pages

Download pre-lab  here.

ECE 2100

Lab. VI - AC Signals, Linear Circuits, and Second-Order Filters


How to determine the frequency response of a circuit
(i. e. obtain Bode plots)
back to page 4


1. Results:

Below are the results from the circuits built by the TA:




What do you think of the experimental results (points) vs. model fits (filled curves)?  Are there any bad fits or significant disagreements between the data and the model fits?

The models are exactly the transfer functions shown on page 2 and in the App.
You can obtain your own models by simply measuring your R's and C's and enter their actual values (not nominal) into the App, then click on Bode plots and you can save the output plots as graphic objects.


2. How were the results obtained:

First, we started by searching where the response is the largest by tuning the frequency knob. Your eye-hand coordination is the essence. So, we obtain this data from the scope:

 


The above is an example, showing input amplitude, output amplitude and phase. We don't need frequency, because the signal generator is sufficiently reliable. Of course one can choose to use the scope to measure frequency as well. Next, we tuned the frequency to some nearby values to make sure we are not missing anything near the peak of the response. Here are the data:


(note that saving data as .csv file is the best, albeit taking a bit more effort, because you can obtain the measurements with more rigorous statistical analysis and more accurate results as discuss in item 4 below).

Next, we wanted to go to extreme frequencies, either high or low. We chose to go high, then back to low. Here are the full data:



Notice that at 15 kHz, the output was so low that we had to increase the input amplitude to 10.5 V to read 72 mV (with large uncertainty) of the output. Then we went back to a frequency near the peak response, 850 Hz just to make sure that thing didn't change when we went up to high frequency. Then we went to low frequencies, all the way to 50 Hz.

"But the scope measurements jump allover the places, how can we read the numbers?"

Understanding how the scope works is a part of learning.



Above is a case that even when we increased input signal to 5 V, the output was merely 95 mV. Why didn't we use autoscaling that would show only 2 periods? The scope measurements are based only on what it samples and digitizes: the displayed traces. Hence, when you select to have many cycles on the display, the scope can average over many maxima and minima of the waveform to give an amplitude reading with lower standard of deviation, which means less "jumping around". (See an example of analyzing data from .csv file below).

Here is another example with output amplitude 131 mV.





And so, we repeated the approach for the high-pass and band-pass filter. Below are the data:



Notice a missing figure? not really, as we entered the data, if a measurement is the same as the previous, sometimes, we just skipped typing in, with the default is that it is the same value as the previous.



What is the most significant result of the band pass data above? The data shows a gain of 10 dB at 0.92 kHz. We obtained that first because we searched for it, the peak gain. To ensure there was no "human" error (misread, typos etc.), we took another record of the data for sanity check below. You can see indeed that the active band-pass filter gives 10-dB amplitude gain (equivalent with 20-dB power gain). The phase was fluctuating + - 0.5 degree, hence we took the mean, which is 0 degree.




3. Data analysis and presentation

Strictly speaking, there is nothing to analyze in these data. We just do basic calculation to convert amplitude into dB and phase in degree into Pi by dividing it by 180 degree. Notice something about the phase sign? In Bode plot for phase, the convention is to plot the phase output relative to the input, i. e. 2->1. The scope shows the phase for 1->2. Hence, we just flip the sign to plot.

You should obtain the transfer function model of your circuits by entering the actual R's and C's values into the App. and obtain the bode plots. It only makes sense if you compare your data with the model based on your actual circuit elements, not on nominal or default values set in the App. Use your digital multimeter to measure your resistors and capacitors - report these in your lab notebook (just like we always do).

For our circuits here, they are fortuitously very close to the nominal designs. It is OK for yours to deviate.



4. A note about analyzing data from .csv file 


There is an advantage with .csv file: you can obtain direct digital data from the oscilloscope. A very simple software can read, calculate and plot the data. For example, here is the result from a .csv file for the high-pass filter:



then, one can do statistical fitting. The red and light blue curves are the fitted lines, green and yellow dots are data. The fitting is so good that it is hard to distinguish the fit curves from the data. Note that one can see the digitizing limit of the data. Given the high resolution of the scope ADC, the digitizing effect observed is likely from the lower resolution DAC of the function generator. This is the reason why the more signal cycles are collected on the screen, the better the statistical fit will be.



The results of the fit are:
a1= 0.986761;   a2=2.44892;  a2/a1=2.48178 or 3.95 dB
and phase shift = 78.7 degree.

These can be compared with the data by reading off the screen:
a1=1.025;   a2=2.55;  
a2/a1=2.4878 or 3.96 dB
and phase shift = 74 degree.

The statistics with .csv file is better when the signal amplitudes are smaller and noisier.