Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

You might start to notice the repetition with imports. We will again import numpy and matplotlib.pyplot so we can deal with arrays of numbers and plotting. Shift-Enter the code cell below before getting started.

Part 1 - Multistage RC Circuits

We want to plot the gain and the phase, ϕ\phi as functions of the signal frequency, ω\omega. You will plot your experimental resutls and overlay the theoretical model. We will not do any fitting of the model to the data. In the code cell below

  • ω\omega is calculated to be an array from 0 to 100 000 in steps of 1 rad/s.

  • Constants for the resistors and capacitors are entered, but you may need to change the values if you used different resistor and capacitor values.

  • The theoretical gain and phase are calculated for you.

  • Enter your measured angular frequencies, ω\omega.

  • Enter your measured gain.

  • Enter your measured phase, ϕ\phi.

The code will plot your data and the theoretical model. A figure image will be saved for you.

Part 2 - RLC Circuits

  • Copy the code above and paste it in the code cell below.

  • Delete the second resistor and capacitor values.

  • Add a constant for your inductor value.

  • Delete the print statement.

  • Change the theoretical gain_theory to current_theory, and enter the math for the theoretical function

  • Edit the theoretical phase phase_theory with the RLC phase function.

  • Add your experimental frequencies (rad/s) to omega_exp.

  • Change the experimental gain_exp to current_exp and enter your measurements.

  • Add your experimental phase measurements to phase_exp.

  • Change the array names in the plotting section to match your new names.

  • Change the filename that is saved.

Run the code to get a graph of your data with the theoretical models overlaid.