Difference between revisions of "Spike Prime - Average Speed"

From RoboWiki
Jump to: navigation, search
m (Program)
Line 1: Line 1:
 
== Let's begin ==
 
== Let's begin ==
  
introduction...
+
Imagine your family is traveling with a train from city A to city C, but the train passes through city B on the way (without stopping).
 +
The tracks were reconstructed between B and C, so the train can travel much faster between those cities. By a coincidence, the distance from A to B is the same as from B to C. We are going to measure the time it takes to travel both parts, calculate velocities on both segments, and then estimate the average speed based on the two speeds. At the first sight, since the distances are the same, it may look like we obtain the average velocity simply by averaging the two velocities, i.e. (v1 + v2) / 2. However, the average velocity can clearly be calculated by dividing the total distance by the total time. In this exercise we will compare the two values - we they be the same?
  
 
== Build ==
 
== Build ==
Line 24: Line 25:
  
 
* [[Media:spike_average_speed_vehicle.io|vehicle (stud.io)]]
 
* [[Media:spike_average_speed_vehicle.io|vehicle (stud.io)]]
 +
 +
Prepare your track - use a black tape to mark the locations of the cities A, B, and C with a black line on the floor perpendicular to the "train" movement.
  
  
Line 33: Line 36:
 
Download: [[Media:average_speed.llsp|average_speed.llsp]]
 
Download: [[Media:average_speed.llsp|average_speed.llsp]]
  
description of the program
+
The robot starts moving with 30% of its maximum speed until it arrives to the mark of city A (the start). At that time, it resets the timer, and continues the same speed until the city B, where it speeds up to 60% of its maximum speed, stores the time A -> B into a variable t1 and resets the timer again. In the city C, it stops, stores the time of travel B -> C into variable t2.
 +
 
 +
In the second part, it calculates the velocities v1, and v2, and shows on its display the average of the two values v1 and v2, and also the average speed calculated by dividing the total distance by total time.
 +
 
  
 
== Measure, analyze, think ==
 
== Measure, analyze, think ==
Line 46: Line 52:
  
 
* Perform measurements with your model and discuss in your group what has happened.
 
* Perform measurements with your model and discuss in your group what has happened.
 +
* Can you explain why the two values are different?
  
  
 
== Explore and modify ==
 
== Explore and modify ==
  
* Modify the program so that ...
+
* Modify the program to use different velocities and repeat the experiment.
* Modify the model so that ...
+
* Modify the program so that it will use the rotations sensor to measure the distance and thus it will be able to calculate the average speed even if the distances between the cities are not the same.
  
 
== Present ==
 
== Present ==

Revision as of 09:04, 12 February 2020

Let's begin

Imagine your family is traveling with a train from city A to city C, but the train passes through city B on the way (without stopping). The tracks were reconstructed between B and C, so the train can travel much faster between those cities. By a coincidence, the distance from A to B is the same as from B to C. We are going to measure the time it takes to travel both parts, calculate velocities on both segments, and then estimate the average speed based on the two speeds. At the first sight, since the distances are the same, it may look like we obtain the average velocity simply by averaging the two velocities, i.e. (v1 + v2) / 2. However, the average velocity can clearly be calculated by dividing the total distance by the total time. In this exercise we will compare the two values - we they be the same?

Build

Model:

model of vehicle

Pictures:

vehicle vehicle

Building instructions:

Download building instructions:

Download stud.io model:

Prepare your track - use a black tape to mark the locations of the cities A, B, and C with a black line on the floor perpendicular to the "train" movement.


Program

Program - driving Program - calculating

Download: average_speed.llsp

The robot starts moving with 30% of its maximum speed until it arrives to the mark of city A (the start). At that time, it resets the timer, and continues the same speed until the city B, where it speeds up to 60% of its maximum speed, stores the time A -> B into a variable t1 and resets the timer again. In the city C, it stops, stores the time of travel B -> C into variable t2.

In the second part, it calculates the velocities v1, and v2, and shows on its display the average of the two values v1 and v2, and also the average speed calculated by dividing the total distance by total time.


Measure, analyze, think

  • Make your own recording

Example result of measurement:

result of measurement

  • Perform measurements with your model and discuss in your group what has happened.
  • Can you explain why the two values are different?


Explore and modify

  • Modify the program to use different velocities and repeat the experiment.
  • Modify the program so that it will use the rotations sensor to measure the distance and thus it will be able to calculate the average speed even if the distances between the cities are not the same.

Present

  • Prepare a short presentation for other groups. Tell others about how your measurement went, what issues did you have to solve. What do they mean and why did they happen?


Additional resources