Lesson 5. Lesson 5 - Measuring Current: Instantaneous and Average

Gabriella Anton, Connor Bain
Physics
90 minutes
High School
v2

Overview

Students will further develop their understanding of the two different ways to measure current: average current and instantaneous current. Students will be introduced to some computer-based modeling to achieve this, and will interact directly with the NetLogo code and be prompted to write their own code as well. 

Standards

Next Generation Science Standards
  • Physical Science
  • NGSS Practice
    • Using Models
    • Arguing from Evidence
    • Analyzing Data
    • Communicating Information
Computational Thinking in STEM
  • Data Practices
    • Analyzing Data
    • Collecting Data
    • Visualizing Data
  • Modeling and Simulation Practices
    • Using Computational Models to Understand a Concept
  • Computational Problem Solving Practices
    • Computer Programming
  • Systems Thinking Practices
    • Understanding the Relationships within a System

Activities

  • 1. Prediction of Sampling Rate
  • 2. Testing Prediction of Sampling Rate
  • 3. Plotting Instantaneous and Average Currents

Student Directions and Resources


Here, you will further develop their understanding of different ways to measure current. Further, you'll explore how this data is managed and visualized in the NetLogo model you've been using. 

1. Prediction of Sampling Rate


When you drive a car, you typically don't drive the same speed the whole time. The car's speedometer changes as you drive and tells you the instantaneous speed at that moment in time. 

The current through a wire functions in a similar way: current changes at different points in time because the flow of electrons through the wire is changing. This means that the number of charges passing through one part of the wire is changing. Imagine pausing time and then measuring the current in the wire at one point--that is the instantaneous current.

This NetLogo model does not measure the exact instantaneous current. So, to estimate instantaneous current, the model takes a very small amount of time which simulates one instant. This small amount of time is called the sampling rate and can be adjusted in the model using the "sampling-rate" slider. Remember that NetLogo time units are called ticks


Question 1.1

Make a prediction about how bigger and smaller sampling rates will impact instantaneous current. Explain your reasoning.



2. Testing Prediction of Sampling Rate


Use the model below to change the sampling-rate slider and then answer the questions below. Try using both very small and very large values of sampling-rate and observe the graph.

Try putting sampling-rate on the x-axis of your graph, and then currentNow on the Y axis. 

1) Use the SAMPLING-RATE slider to start the sampling rate at a very low value of 1. 

2) Hit SET UP and GO to run the model. 

3) Hit GO to stop the model between trials.

4) Move the SAMPLING-RATE slider to a new value. 

5) Hit SET UP and GO to run the next trial. 

6) Repeat these steps until you have a graph that allows you to make a conclusion. You may also be able to make conclusions by looking at the data in the table. 


Question 2.1

What is the relationship between sampling rate and instantaneous current?



Question 2.2

Upload a photo of the graph that supports these findings. To do this, click on the graph in the workspace above. When the teal option bar pops up, click on the camera at the bottom and save the image as a local file. Then, click use the file finder below to attach the image to this page. You can upload more than one graph that support your findings.

Upload files that are less than 5MB in size.
File Delete
Upload files to the space allocated by your teacher.


Question 2.3

Explain how the graph(s) uploaded above support your findings.



Question 2.4

Explain how you collected data using the model. 



Question 2.5

Please wait for teacher instruction before moving on

Note: Draw your sketch in the sketchpad below


3. Plotting Instantaneous and Average Currents


Now you will learn how to graph average current in the model, just as instantaneous current is. The code below shows how instantaneous current was plotted in the model.

set-current-plot-pen provides a label for the graph and tells the model to start plotting something

plotxy ticks tells the model what to plot every tick (or time point)

current-now-list is a list that contains values representing how many charges are passing through this section of the wire at every tick for the past n ticks where n is the sampling rate in the slider

sum  adds up all the values in a list 

length finds the length of a list. For current-now-list, this will always be the sampling rate

Now, open the code tab of the model. To do this:

1) Scroll down in the model on the left and you will see three tabs "Command Center", "NetLogo Code", and "Model Info".

2) Click "NetLogo Code" to open the code tab. 

You can find the plotting code from above if you scroll down in the code tab to lines 378 and 379. Look in the code tab and find current-now-list. This shows how the current now (stored in current-now-list) is plotted in the graph within the model. 

If you want to see how current-now-list look at lines 204 and 205 which contain code that states if the length of the list is greater than the sampling-rate (that is set by you with the slider), the first item of the list is removed. So, if you set your sampling rate to 50, then my-charge-list shows how many charges pass through this sections of the wire for the most recent 50 ticks. You can see in lines 201 and 202 how the code adds the current at each tick to lists.  

With the model below, there is another list introduced called average-current-list which also shows how many charges are passing through this section of the wire at every tick like current-now-list, but average-current-list does not remove items when the length of the list surpasses the sampling rate. This means all values remain in the list and none are ever removed. 

Explore the model and look at the code tab to examine this.


Question 3.1

At the bottom of the code tab, around line 371, you will see that the plotting code has been changed to reflect the addition of this new list, but the highlighted line, that should tell the plot what data to display, is still missing the code to create the plot. 

What code would you need to add on this highlighted line to make the plot appear correctly?

Hint: The code you wrote in Codap to perform this calculation similarly in a data table has a completely different syntax than NetLogo code. The NetLogo code should perform a similar operation, but you should use the other plotting code (line 369) as a reference for what your code should look like. 

Play around with the model to test your code.