\documentclass{simiode}

\def\TeacherEdition{0} % Toggle this line's value.
\newcommand{\teacher}[1]{\ifnum\TeacherEdition=1 #1 \fi}

\usepackage{amsmath,amssymb,amsthm}
\usepackage{color}
\usepackage[table]{xcolor}
\newcolumntype{g}{>{\columncolor{white!88!black}}c}
\usepackage{graphicx,pgfplots,float}
\pgfplotsset{compat=1.17}
\usetikzlibrary{arrows.meta,calc,decorations.markings,math,arrows.meta}
\usepackage{url}
\renewcommand{\baselinestretch}{1.3}

\begin{document}

\newpage

\title{\ifnum\TeacherEdition=1 TEACHER VERSION \else STUDENT VERSION \fi\\Modeling the Velocity of a Pull-Back Toy}


\markboth{Pull-Back Toy}{Dynamics}

\author{Brody Dylan Johnson \\
Saint Louis University\\
Saint Louis MO 63103USA\\
\teacher{brody.johnson@slu.edu}
}

\makeStitlePDFLaTex


\begin{abstract}
  This hands-on modeling scenario guides students through the development of an empirical model for the velocity and distance traveled of a simple pull-back toy.  Students can record videos and extract data using their own pull-back toy or use data included in the student version.  Two different models are proposed for the torque delivered by the pull-back motor and students will use the experimental data to determine which model is more accurate while also predicting the top speed and maximum travel distance of the toy.  An optional theoretical component justifies the form of the second-order differential equation used in the mathematical model.      
\end{abstract}


\section*{SCENARIO DESCRIPTION}

A pull-back toy (as shown in Figure \ref{truck}) is typically a small car or truck powered by a clockwork motor \cite{Wikipedia2021}.  A flat spiral spring in the pull-back mechanism is wound as the toy vehicle is pushed backwards and this spring provides a locomotive force when the toy is released \cite{OwenJared}.  In this project, a mathematical model will be developed to predict the motion of a pull-back toy using real data and, ultimately, to estimate the maximum speed and travel distance of the toy.  \teacher{The acceleration of a pull-back toy is illustrated in Figure \ref{accelfig} using a strobe photograph.}

\teacher{
\begin{figure}[H]
\centering
\includegraphics[width=6.0in]{TowMater.jpg}
\caption{Strobe photograph of a pull-back toy during acceleration.} \label{accelfig}
\end{figure}
}

\medskip \noindent
\begin{minipage}{0.575\textwidth}
\hskip15pt The pull-back motor has an ingenious design that allows the internal spring to be wound over a relatively short distance as the toy is moved in reverse, yet it provides locomotive force over a substantially longer distance as the toy rolls forward.  One possibly unexpected consequence of this design is that the locomotive force of the pull-back motor stops once the toy has traveled a specific distance (as opposed to a specific amount of time).  Once the spring has completely unwound, the toy will begin to coast and gradually slows down as a result of various frictional losses.  This unique characteristic of the pull-back motor must be treated carefully in the mathematical model.
\end{minipage} \hskip2em
\begin{minipage}{0.4\textwidth}
\begin{figure}[H]
\includegraphics[width=2.25in]{Truck.jpg}    

\caption{A pull-back toy obtained \newline as a cereal box prize, circa 2006.} \label{truck}
\end{figure}
\end{minipage}

\medskip
A variety of physical quantities could enter into play in the analysis of a pull-back toy, e.g., the mass of the vehicle and wheels, the rotational inertia of the wheels, the radius of the wheels, the stiffness of the internal spiral spring, the gear ratios of the pull-back mechanism, etc.  It would be a difficult task to determine precise values for all of these quantities.  Fortunately, it is possible to build a realistic model describing the motion of the pull-back toy without any knowledge of these physical constants.  This fact will be explained in detail in the Section \ref{section1} and may go beyond the scope of a typical course in ordinary differential equations.  However, this explanation can be omitted without any detriment to the project, allowing students to either skim or skip Section \ref{section1} before proceeding to Section \ref{section2}.

\section*{MATERIALS}

Sample data obtained from experiments with a real pull-back toy will be provided.  However, students are also encouraged to conduct experiments with their own pull-back toy.  To do so, students are advised to have the following materials on hand:
\begin{itemize}
\item A pull-back toy;
\item A digital video camera;
\item A tape measure;
\item A roll of masking tape.
\end{itemize}

\section{The Mathematical Model} \label{section1}

Newton's Second Law is the key tool in the development of a mathematical model for the pull-back toy.  A simple schematic drawing of a typical pull-back toy is provided in Figure \ref{schematic}.  The effect of the pull-back motor is to apply a moment $M(x,t)$ to the rear axle of the toy, which is counteracted by a frictional force $f(x,t)$ between the ground and the wheels.  It will be assumed that the moment $M$ cannot overcome the frictional force $f$, which means the pull-back toy will be subject to \emph{pure rolling}, i.e., the wheels will not slip on the ground.

\begin{figure}[thp]
\begin{center}
\begin{tikzpicture}[scale=1]

  \draw[color=gray!50!white] (0,0) -- (8,0);
  \foreach \x in {1,...,19}
    \draw[color=gray!50!white] (0.4*\x,0) -- (0.4*\x+0.2,-0.25);

  \draw[thick,fill=black!75!white] (2,0.5) circle (0.5);
  \draw[thick,fill=gray!40!white] (2,0.5) circle (0.25);
  \draw[black!70!white] (2.6,0.5) arc (0:180:0.6);    
  \draw[black!70!white] (2.6,0.5) -- (2.7,0.5);
  \draw[black!70!white] (2.7,0.5) arc (0:180:0.7);    
  \draw[black!70!white] (1.3,0.5) -- (1.4,0.5);
  
  \draw[-{Latex[scale=1.5]},thick] (1,-0.05) -> (2,-0.05);
  \node[scale=1.5] at (0.75,0) {$f$};
  \draw[-{Latex[scale=1.5]},thick] (4,-0.05) -> (5,-0.05);
  \node[scale=1.5] at (3.75,0) {$f$};
  \draw (2,1.375) arc (90:150:0.875);    
  \draw[-{Latex[scale=1.5]}] (2,1.375) arc (90:30:0.875);    
  \node[scale=1.5] at (2,1.75) {$M$};
  

  \draw[thick,fill=black!75!white] (5,0.5) circle (0.5);
  \draw[thick,fill=gray!40!white] (5,0.5) circle (0.25);
  \draw[black!70!white] (5.6,0.5) arc (0:180:0.6);    
  \draw[black!70!white] (5.6,0.5) -- (5.7,0.5);
  \draw[black!70!white] (5.7,0.5) arc (0:180:0.7);    
  \draw[black!70!white] (4.3,0.5) -- (4.4,0.5);
    
  \draw[black!70!white] (2.7,0.5) -- (4.3,0.5);
  \draw[black!70!white] (5.7,0.5) -- (6,0.5) -- (6,1.625) -- (4.75,1.625) -- (4.25,2.5) 
      --(3.25,2.5) -- (3.25,1.5) -- (1,1.5) -- (1,0.5) -- (1.3,0.5);
  \draw[black!70!white,fill=green!10!white] (4.625,1.625) -- (4.15,2.375)
      -- (3.375,2.375) -- (3.375,1.625) -- (4.625,1.625);
  \draw[black!70!white,fill=gray!40!white] (6.05,0.5) -- (6.25,0.5) -- (6.25,0.875) -- (6.05,0.875) -- (6.05,0.5);
  \draw[black!70!white,fill=gray!40!white] (0.75,0.5) -- (0.95,0.5) -- (0.95,0.875) -- (0.75,0.875) -- (0.75,0.5);
\end{tikzpicture}
\end{center}
\caption{Schematic of Pull-Back Toy with External Forces.} \label{schematic}
\end{figure}

\noindent
The pure rolling assumption guarantees that distance traveled by the pull-back toy, $x(t)$, will be directly proportional to $\theta(t)$, the angle of rotation of the wheels.  In particular,
\begin{equation} \label{purerolling}
x(t) = r \theta(t),
\end{equation}

\noindent
where $r$ is the radius of the wheels.  In order to account for the rotation of the wheels and the linear motion of the toy, Newton's Second Law must be applied in both the rotational and linear forms.  Applying the rotational form of Newton's Second Law to the wheels (all four combined) leads to the equation
\begin{equation} \label{rotform}
I \frac{d^{2}\theta}{dt^{2}} = M(x,t) - r f(x,t),
\end{equation}

\noindent
where $I$ represents the combined rotational inertia of the wheels.  Note that, in \eqref{rotform}, $f(x,t)$ represents the combined frictional force applied to all four wheels.  This frictional force also acts to accelerate the pull-back toy horizontally and is transferred to the body of the pull-back toy via the axles.  Hence, application of the linear form of Newton's Second Law to the pull-back toy produces the equation
\begin{equation} \label{longform}
m \frac{d^{2}x}{dt^{2}} = f(x,t),
\end{equation}

\noindent
where $m$ represents the mass of the pull-back toy (including the wheels).  Together, \eqref{rotform} and \eqref{longform} describe the motion of the pull-back toy.

The equations of motion \eqref{rotform} and \eqref{longform} are relatively simple, but, unfortunately, it is not practical to  quantify all of the physical constants involved.  Luckily, the pure rolling assumption permits a critical simplification because the relationship between $x$ and $\theta$ can be used to eliminate the frictional force $f$.  Indeed, multiplying \eqref{longform} by $r$, adding the result to \eqref{rotform}, and applying \eqref{purerolling} leads to a single equation of motion,
\begin{equation} \label{EOM1}
\left ( \frac{I}{r} + mr \right ) \frac{d^{2}x}{dt^{2}} = M(x,t).
\end{equation}

\noindent
It is evident from the equation of motion that the acceleration of the pull-back toy is proportional to the moment applied by the internal spring.  There is one further adjustment that should be made to the equation of motion in order to make it as realistic as possible.  In order to account for air resistance and other frictional losses, it will be assumed that the speed of the pull-back toy decays exponentially in the absence of the moment from the pull-back motor.  These observations lead to an equation of motion with the following form,
\begin{equation*}
\frac{d^{2}x}{dt^{2}} + k \frac{dx}{dt} = \widetilde{M}(x,t),
\end{equation*}

\noindent
where $k$ is the decay rate for the velocity of the pull-back toy and
$$ \widetilde{M}(x,t) := \frac{M(x,t)}{\frac{I}{r} + m r } = \frac{M(x,t)r}{I + m r^{2}}, $$

\noindent
represents the applied moment of the pull-back motor normalized by appropriate physical constants.

Notice that the normalized moment due to the pull-back motor has been written in the form $\widetilde{M}(x,t)$, meaning that it could depend explicitly on either or both of the variables $x$ and $t$.  This moment is produced by the unwinding of the internal spring within the pull-back motor.  The spring unwinds as the wheels rotate and the car rolls forward, which means the spring tension is a function of $x$ and has no \emph{explicit} dependence on $t$.  Therefore, the normalized moment shall be written hereafter as $\widetilde{M}(x)$.  Moreover, the pull-back motor produces no moment once the internal spring has unwound fully, implying that  $\widetilde{M}(x)=0$ for sufficiently large $x$.  

It is not clear how quickly the torque output of the pull-back motor decreases as the internal spring unwinds.  Two simple models will be considered.  The first approach will be referred to as the \emph{constant-torque} model and assumes that $\widetilde{M}(x)$ has the form
\begin{equation} \label{CTeq}
\boxed{\widetilde{M}(x) = \begin{cases} M_{0} & 0\le x \le x_{0} \\ 0 & x> x_{0}. \end{cases},}
\end{equation}

\noindent
where $x_{0}$ is the distance at which the internal spring will have completely unwound.  The graph of $\widetilde{M}(x)$ for the constant-torque model is shown in Figure \ref{MCT}.  The second approach is based on a \emph{linear-torque} model, which assumes that $\widetilde{M}(x)$ takes the form
\begin{equation} \label{LTeq}
\boxed{\widetilde{M}(x) = \begin{cases} M_{0} \left ( 1 - \frac{x}{x_{0}} \right ) & 0\le x \le x_{0} \\ 0 & x> x_{0}. \end{cases}.}
\end{equation}

\noindent
The graph of $\widetilde{M}(x)$ for the linear-torque model is shown in Figure \ref{MLT}. 

\begin{figure}[thp]
\begin{center}
\begin{tikzpicture}
    \begin{axis}[width=4.0in,height=1.5in,
            xlabel=$x$,ylabel=\empty,xmin=-20,xmax=180,ymin=-10,ymax=45,
            axis y line=middle,axis x line=middle,
            xtick={0,80},
            xticklabels={0,$x_{0}$},ytick={0,30},yticklabels={0,$M_{0}$},
             every axis x label/.style={at={(current axis.right of origin)},anchor=west},
             every axis y label/.style={at={(current axis.north west)},left=2mm}]
    \addplot[blue,thick,domain=-20:0,samples=101]{0};
    \addplot[blue,thick,dashed,domain=0:30,samples=51]({0},{x}); 
    \addplot[blue,thick,domain=0:80,samples=101]{30};
    \addplot[blue,thick,dashed,domain=0:30,samples=51]({80},{x}); 
    \addplot[blue,thick,domain=80:180,samples=101]{0};
    \node[scale=1] at (axis cs: 40,40) {$\widetilde{M}(x)$};
  
\end{axis}
\end{tikzpicture}
\end{center}
\caption{The form of the moment function for the constant-torque model.} \label{MCT}
\end{figure}

\begin{figure}[thp]
\begin{center}
\begin{tikzpicture}
    \begin{axis}[width=4.0in,height=1.5in,
            xlabel=$x$,ylabel=\empty,xmin=-20,xmax=180,ymin=-10,ymax=40,
            axis y line=middle,axis x line=middle,
            xtick={0,80},
            xticklabels={0,$x_{0}$},ytick={0,30},yticklabels={0,$M_{0}$},
             every axis x label/.style={at={(current axis.right of origin)},anchor=west},
             every axis y label/.style={at={(current axis.north west)},left=2mm}]
    \addplot[blue,thick,domain=-20:0,samples=101]{0};
    \addplot[blue,thick,dashed,domain=0:30,samples=51]({0},{x}); 
    \addplot[blue,thick,domain=0:80,samples=101]{30*(1-x/80)};
    \addplot[blue,thick,domain=80:180,samples=101]{0};
    \node[scale=1] at (axis cs: 50,23) {$\widetilde{M}(x)$};
  
\end{axis}
\end{tikzpicture}
\end{center}
\caption{The form of the moment function for the linear-torque model.} \label{MLT}
\end{figure}

Under all of the above assumptions, the position of the pull-back toy will be modeled by the second-order differential equation
\begin{equation} \label{mathmodel}
x'' + k x' = \widetilde{M}(x),
\end{equation}

\noindent
where $\widetilde{M}(x)$ obeys either \eqref{CTeq} or \eqref{LTeq}.  It is now clear that each model depends on just three physical constants: $M_{0}$, $x_{0}$, and $k$.  The constant $M_{0}$ quantifies the maximum output of the pull-back motor, while the constant $x_{0}$ represents the distance over which the internal spring completely unwinds.  Finally, the constant $k$ accounts for the decay of the velocity of the pull-back toy due to air resistance and other frictional losses.

\section{The Empirical Model} \label{section2}

In Section \ref{section1}, a mathematical model was derived to describe the horizontal position of a pull-back toy after it is fully wound and released.  It was shown that the horizontal position of the pull-back toy, $x(t)$, can be modeled by the second-order differential equation $x''+kx' =\widetilde{M}(x)$, where $\widetilde{M}(x)$ is given by \eqref{CTeq} for the constant-torque model or \eqref{LTeq} for the linear-torque model.  In either case, the model employs three physical constants: the constant $x_{0}$ describes the wind-down distance of pull-back motor, $M_{0}$ quantifies the moment generated by the pull-back motor, and $k$ represents the decay rate of the toy's speed due to frictional losses.  The goal of this section is to conduct experiments that will lead to estimates for each of these constants.

\subsection{Estimation of $x_{0}$} \label{subsection2.2}

The second paragraph of the problem statement described one of the key innovations of the pull-back motor, namely, that the motor can be wound up by pushing the toy backwards over a short distance, yet the motor supplies torque to the wheels over a much longer distance when the toy is in motion.  The shorter distance over which the toy is pushed backwards will be referred to as the \emph{wind-up distance}, while the longer distance over which the pull-back motor unwinds will be called the \emph{wind-down distance}.  The wind-down distance, denoted by $x_{0}$, indirectly describes the amount of time that the pull-back motor will supply torque and is, therefore, critical to estimates of the top speed and travel distance for a pull-back toy.  Fortunately, it is possible to estimate $x_{0}$ without taking the toy apart to examine the internal components of its pull-back motor.  For the toy shown in Figure \ref{truck}, the wind-down distance $x_{0}$ is approximately $218 \texttt{cm}$.  In contrast, the wind-up distance for the toy is roughly $20 \texttt{cm}$, corresponding to a ratio of about 10.9:1.

\bigskip \noindent
{\bf Student Task:} Use the procedure below to obtain an estimate of $x_{0}$.  Students who are unable to conduct their own experiment can skip this task and use the given value for $x_{0}$. 
\begin{small}
\begin{enumerate}
\item {\bf Wind the pull-back toy up by pushing it backwards.}

\smallskip \noindent
A series of noticeably louder/stronger clicks will be heard/felt when the internal spring is fully wound.

\item {\bf Place a mark at the starting location of the pull-back toy.}

\smallskip \noindent
The wind-down distance $x_{0}$ could be anywhere from a couple of feet up to ten or more feet.  Make sure that there is enough space for the toy to wind down completely.

\item {\bf Keeping one hand in contact with the front of the toy, allow the toy to make a series of short advances until the motor has completely wound down.}

\smallskip \noindent
This process will take a little while and the key is to regularly stop the car so that it is unable to coast after the torque from pull-back motor is exhausted.  It may take several attempts to perform this step smoothly.

\item {\bf Place a mark at the ending location of the pull-back toy.}

\smallskip \noindent
It would be wise to use a different mark for each trial, e.g., a piece of masking tape with the trial number written on it.

\item {\bf Measure the distance between the two marks, which provides an estimate of $x_{0}$.}

\smallskip \noindent
Repeat the entire procedure two or three times, making sure the results are consistent.
\end{enumerate}
\end{small}

\begin{samepage}
\noindent
Questions:

\begin{enumerate}
\item How does your estimate of $x_{0}$ compare to your expectations?

\item Modify the above procedure to measure the wind-up distance (defined above) for the pull-back toy and denote this distance by $x_{1}$.  What is the ratio of $x_{0}$ to $x_{1}$?  How does it compare to the ratio given for the toy shown in Figure \ref{truck}?

\item How consistent were the estimates obtained in the different trials?  Did anything happen during your trials that could have affected the estimate, e.g., did the wheels slip at any point?
\end{enumerate}
\end{samepage}


\subsection{Estimation of $M_{0}$ and $k$} \label{subsection2.3}

It is now time to put the pull-back toy in motion and acquire data that can be used to complete the empirical model.  This will be accomplished by video recording the motion of a fully-wound toy as it accelerates from rest.  Frame-by-frame analysis of the video will lead to position data for the toy from which the velocity can be estimated.  Numerical methods will be used to compare the solution of the mathematical model \eqref{mathmodel} with the experimental velocity data, leading to estimates for the parameters $M_{0}$ and $k$.

\bigskip \noindent
{\bf Student Task:} Use the following procedure to collect data for the estimation of $M_{0}$ and $k$.  Students who are unable to conduct their own experiment can use the data in Table \ref{acceldata}.
\begin{small}
\begin{enumerate}
\item {\bf Use the measuring tape and masking tape to establish a series of regularly-spaced markers on the test surface.}

\smallskip \noindent
Intervals of 5 \texttt{cm} are recommended for the first 50 \texttt{cm} with intervals of 10 \texttt{cm} thereafter.  The total length of the test area should be at least 150 \texttt{cm}.

\item {\bf Use the video camera to record two or three experiments in which the fully-wound toy accelerates from the starting mark into the test area.}

\smallskip \noindent
Try to keep the camera relatively still during the recording and keep the starting mark and as many of the subsequent marks in the field of view throughout the recording.  Only one good experiment is needed, so repeat the experiment until everything goes smoothly and a nice, steady video is obtained.

\item {\bf Create position data from your video using a computer.}
    
\smallskip \noindent    
Advance through the video, frame by frame, and record the number of frames that have elapsed up to the moment when the front of the toy crosses each mark on the test surface. Frame 0 should correspond to the moment when the toy is released from the starting mark.  Note the distanced traveled for each mark.  Many digital cameras record 30 frames per second, in which case the time for each data point can be calculated as: $\texttt{time} = \texttt{(frame number)}/30$.  Make sure to verify the frame rate and adjust this formula accordingly, as some cameras use 60 or 120 frames per second.  (The video used to produce Table \ref{acceldata} includes 60 frames per second.)
\end{enumerate}
\end{small}

\begin{table}[hbtp]
\caption{Time and Position Data for the Pull-Back Toy Depicted in Figure \ref{truck}.} \label{acceldata}
\begin{center}
\begin{small}
\begin{tabular}{|c|c|c|c|c|c|c|c|}
\hline
\rowcolor{white!88!black}
Time (\texttt{s})      & 0.000 & 0.250 & 0.350 & 0.433 & 0.517 & 0.583 & 0.650 \\
\hline
Position (\texttt{cm}) &    0 &      5 &   10 &   15 &   20 &   25 &   30 \\
\hline \hline
\rowcolor{white!88!black}
Time (\texttt{s})      & 0.700 & 0.700 & 0.800 & 0.850 & 0.950 & 1.033 & 1.117 \\
\hline
Position (\texttt{cm}) &    35 &   40  &   45  &   50  &   60 &     70 &   80 \\
\hline \hline
\rowcolor{white!88!black}
Time (\texttt{s})      & 1.200 & 1.267 & 1.333 & 1.417 & 1.483 & 1.550 & 1.617 \\
\hline
Position (\texttt{cm})  &   90 &  100 &  110 &  120  &  130  &   140  &   150 \\
\hline
\end{tabular}
\end{small}
\end{center}
\end{table}

At this point, students should have a table of time and position data for a pull-back toy taken while the fully-wound toy is accelerating from rest.  The next task involves fitting the second-order mathematical model to this data to obtain estimates for $M_{0}$ and $k$. The improved Euler method will be used to estimate the solution of the mathematical model for any choice of the constants $k$, $x_{0}$, and $M_{0}$.  In order to use the improved Euler method, the second-order differential equation \eqref{mathmodel} must be converted into a first-order system.  Let $v=x'(t)$ represent the velocity of the pull-back toy, so that $v'(t)=x''(t)$.  With this definition, \eqref{mathmodel} is equivalent to the system
\begin{equation} \label{system}
  \begin{gathered}[c]
    \frac{dx}{dt} = v \\
    \frac{dv}{dt} = \widetilde{M}(x)-kv.
  \end{gathered}
\end{equation}

\noindent
The improved Euler method will allow for the estimation of $x$ and $v$ at regularly spaced times $t_{n}:=n\Delta t$, where $\Delta t >0$ is the step-size and $n\ge 1$ is an integer index for the estimates.  Letting $x_{n}$ and $v_{n}$ represent the estimates of $x(t_{n})$ and $v(t_{n})$, the procedure shown in Figure \ref{IEMethod} can be used to calculate $x_{n+1}$ and $v_{n+1}$ from $x_{n}$ and $v_{n}$.  Notice that because the pull-back toy begins at rest in this experiment, the initial conditions must be $x_{0}=0$ and $v_{0}=0$.

\begin{figure}[thp]
\centering
\fbox{\begin{minipage}{0.625\textwidth}
\begin{small}
\noindent
Improved Euler Method for \eqref{system}:

\begin{enumerate}
\item Compute initial slope estimates:
\begin{align*}
m_{1} &= v_{n} \\
n_{1} &= \widetilde{M}(x_{n})-k v_{n}.
\end{align*}

\item Compute a temporary estimate for $x$ and $v$:
\begin{align*}
\tilde{x} &= x_{n} + m_{1} \Delta t \\
\tilde{v} &= v_{n} + n_{1} \Delta t.
\end{align*}

\item Compute final slope estimates:
\begin{align*}
m_{2} &= \tilde{v} \\
n_{2} &= \widetilde{M}(\tilde{x})-k \tilde{v}.
\end{align*}

\item Compute $x_{n+1}$ and $v_{n+1}$:
\begin{align*}
x_{n+1} &= x_{n} + \left ( \frac{m_{1}+m_{2}}{2} \right ) \Delta t \\
v_{n+1} &= v_{n} + \left ( \frac{n_{1}+n_{2}}{2} \right ) \Delta t.
\end{align*}
\end{enumerate}
\end{small}
\end{minipage}}

\caption{The Improved-Euler Method applied to the system \eqref{system}.} \label{IEMethod}
\end{figure}

\bigskip \noindent
{\bf Student Task:} Use a spreadsheet to estimate $M_{0}$ and $k$ from the experimental data collected earlier.

\begin{enumerate}
\item {\bf Set up columns for all of the required variables and enter the observed time and position data.}

\smallskip \noindent
Seven columns are needed: (A) Frame, (B) Time $t$, (C) Position $x(t)$-observed, (D) Velocity $v(t)$-observed,  (E) Position $x(t)$-predicted, (F) Velocity $v(t)$-predicted, (G) Squared Error.  Use the sum of the squared error for $v$ in the last column.  (See Figure \ref{screenshot1} for a screenshot.)

\begin{figure}[thp]
\centering
\includegraphics[width=4.0in]{screenshot1.png}
\caption{Screenshot of the intial spreadsheet setup.} \label{screenshot1}
\end{figure}

\item {\bf Calculate the observed velocity data from the observed position data.}

\smallskip \noindent
The observed velocity at for the $n$th data point should be estimated from the position data as follows:
$$ v_{n} = \frac{\Delta x}{\Delta t} = \frac{x_{n+1}-x_{n-1}}{t_{n+1}-t_{n-1}}.$$

\noindent
Note that for the first and last data points this \emph{double-sided} estimate must be replaced by an appropriate \emph{single-sided} estimate.

\item {\bf Create individual cells for: $M_{0}$, $k$, $x_{0}$, $\text{SSE}$, and $\Delta t$.}

\smallskip \noindent
Use the value of $x_{0}$ found earlier in the project.  Start with $k=0.5$ and $M_{0}=100$ as an initial guess.

\item {\bf Choose either the constant-torque model or linear-torque model.}

\smallskip \noindent
This choice affects the formula for $\widetilde{M}(x)$ that is used in the improved Euler Method.  The constant-torque model uses \eqref{CTeq}, while the linear-torque model uses \eqref{LTeq}.  It will be necessary to use a conditional logic function (typically called \texttt{IF}) to implement these formulas.

\item {\bf Implement the improved Euler method shown in Figure \ref{IEMethod} using additional rows.}

\smallskip \noindent
Ten columns will be needed, as shown in Figure \ref{screenshot2}.  It would be a good idea to use a step size $\Delta t$ equal to the reciprocal of the frame rate for the camera.  Reference the appropriate values of $x_{k}$ and $v_{k}$ to fill in Columns E and F, above.  For example, in order to estimate $x(1.483)$ in Column E with $\Delta t=\frac{1}{60}$, the value of $x_{89}$ should be referenced. 

\begin{figure}[thp]
\centering
\includegraphics[width=5.375in]{screenshot2.png}
\caption{Screenshot of the spreadsheet implementation of the improved Euler method.} \label{screenshot2}
\end{figure}

\item {\bf Add scatter plots of the observed and predicted values of $x(t)$ and $v(t)$.}

\item {\bf Adjust the parameters $M_{0}$ and $k$ to improve the accuracy of the model.}

\smallskip \noindent
Make small adjustments to the parameters while watching the graphs and the sum of the squared error.  Think about how each change will affect the graph before implementing it.  If the spreadsheet is equipped with a solver, feel free to use the solver to optimize the values of $M_{0}$ and $k$ so that the sum of the squared errors is minimized.

\item {\bf Create a new sheet and repeat the preceding steps using the second model.}

\smallskip \noindent
Only the formula for $\widetilde{M}$ will change, which affects the calculation of the slopes $n_{1}$ and $n_{2}$.  The optimal values for $M_{0}$ and $k$ are likely to change.
\end{enumerate}

\begin{samepage}
\noindent
Questions:

\begin{enumerate}
\item How well do the optimized models fit the data?  How do the parameters $M_{0}$ and $k$ compare?

\item What is the maximum speed predicted by each model?  It may be necessary to extend your numerical solution if the toy is still accelerating at the end of the observed data.

\item What is the maximum distance that the pull-back toy can travel under the power of the pull-back motor?  As above, you will likely need to extend your numerical solution to answer this question.

\item How far can the pull-back toy actually roll?  Make a few tests and compare the results with the mathematical models.  Does this information suggest which model more accurately describes the motion of the pull-back toy? (The pull-back toy of Figure \ref{truck} can roll somewhere between 400 and 500 \texttt{cm} when fully wound.)
\end{enumerate}
\end{samepage}


\begin{thebibliography}{98}
\bibitem{Wikipedia2021} Wikipedia article: `Pullback motor'. \url{https://en.wikipedia.org/wiki/Pullback_motor}. Accessed 10 June 2021.

\bibitem{OwenJared} YouTube video: `How does a Pull-Back Toy Car work?' \url{https://www.youtube.com/watch?v=QdvfiVebb_s}. Accessed 15 June 2021.

\end{thebibliography}

\teacher{
\section*{NOTES FOR TEACHERS}

% How to use in a class? Background information needed.
\subsection*{Background Knowledge and Placement in a Course}

This modeling scenario examines the equation of motion for a pull-back toy with the goal of building a mathematical model capable of estimating the maximum speed and travel distance for the fully wound toy.  Ideally, students should be familiar with the {\bf improved Euler method} and understand the relationship between a {\bf second-order differential equation} and the corresponding {\bf first-order system} before this modeling scenario is introduced in the course.  It would be a bonus if students have already seen an application of numerical methods to a system of differential equations. However, this modeling scenario could also be used as a motivational example to introduce numerical methods for systems of differential equations.

The project is designed as a 2--4 week out-of-class assignment under the assumption that students will have access to their own pull-back toy.  Students will need to make a video of at least one experiment where the toy is in motion, using markings on the test surface to provide a reference for the position of the toy in each frame of the video.  The students must then import their video(s) to a computer and extract time and position data based on the frame rate of the video.  In the last phase of the project, the students will apply the mathematical model to the data in order to estimate model parameters and predict the maximum speed and travel distance of the toy.  The 2--4 week lead time is intended to provide students with the opportunity to ask questions if they run into any obstacles along the way.

\subsection*{Customization}
% alternative implementations

If the students will not have access to a pull-back toy, there are at least three alternative implementations:
\begin{itemize}
\item The instructor could provide the students with the video included in the supporting documents.  The students would not need to conduct any experiments, but they would still have the opportunity to extract data from the video before implementing the mathematical model.  It would be reasonable to shorten the lead time for the assignment to 2 weeks in this case.  The supporting file \texttt{experiment.mov} contains a video of a trial run for the pull-back toy of Figure \ref{truck} using 60 frames per second.  In this experiment, the tape marks are spaced 5 \texttt{cm} apart for $0\le x\le 50$ and 10 \texttt{cm} apart for $50\le x\le 150$.

\item The instructor could allow the students to use the position data provided in Table \ref{acceldata} along with the given value for $x_{0}$.  This option eliminates the experiments as well as the data extraction, focusing the project entirely on the implementation of the mathematical model. It would be reasonable to ask the students to complete the assignment in about 1 week.

\item The instructor could use this material as the basis for an instructor-led discussion, especially if the instructor chooses to use the given data and focus on the implementation of the mathematical models.
\end{itemize}

% Materials needed to implement the activity in class
\subsection*{Materials}

In order for students to collect their own data, the following materials should be available:
\begin{itemize}
\item A pull-back toy;
\item A digital video camera;
\item A tape measure;
\item A roll of masking tape.
\end{itemize}

\noindent
At the time of writing in Summer 2021, it was possible to purchase the toy shown in Figure \ref{truck} for about \$6 on eBay, including shipping.  Pull-back toys should also be readily available (individually or in sets) through local and online toy stores and even turn up in the toy aisle of many grocery stores.  Along with the physical materials listed above, students will also need to use spreadsheet software to implement the mathematical models and compare the results with the experimental data.

\section*{Solutions}

\subsection*{Estimation of $x_{0}$}

Using the pull-back truck shown in Figure \ref{truck}, the value of $x_{0}$ was found to be approximately 218 \texttt{cm}.

\noindent
Questions:

\begin{enumerate}
\item How does your estimate of $x_{0}$ compare to your expectations?

\begin{proof}[Answer:]
Personally, I was surprised to learn that the pull-back motor provided torque over such a long distance (218 \texttt{cm}).  It is natural to assume that if the toy is wound up over 15-20 \texttt{cm}, that it would unwind over a similar distance.
\end{proof}

\item Modify the above procedure to measure the wind-up distance for the pull-back toy and denote this distance by $x_{1}$.  What is the ratio of $x_{0}$ to $x_{1}$?  How does it compare to the ratio given for the toy shown in Figure \ref{truck}?

\begin{proof}[Answer:]
The wind-up distance for the pull-back truck shown in Figure \ref{truck} is about $20 \texttt{cm}$ and the ratio $x_{0}:x_{1}$ is approximately 10.9:1.
\end{proof}

\item How consistent were the estimates obtained in the different trials?  Did anything happen during your trials that could have affected the estimate, e.g., did the wheels slip at any point?

\begin{proof}[Answer:]
It often happens that the wheels will slip if there is not enough downward force on the toy as it is held in place.  The most accurate estimates will be obtained if the toy is almost constantly in motion, but slowed down regularly so that the toy will be unable to move past the point at which the pull-back motor is completely wound down.  Hopefully successive estimates will be within a few centimeters of each other. 
\end{proof}
\end{enumerate}


\subsection{Estimation of $M_{0}$ and $k$}

A spreadsheet will be provided as part of the instructor resources that includes both the provided data as well as the implementation of the mathematical model via the improved Euler method.  The original video used to generate the time and position data is also included in the instructor resources and the frame numbers for each data point are given in the spreadsheet.

\noindent
Questions:

\begin{enumerate}
\item How well do the optimized models fit the data?  How do the parameters $M_{0}$ and $k$ compare?

\begin{proof}[Answer:]
The constant-torque model was optimized with $M_{0}=168.0$ and $k=0.794$, while the linear torque model had optimal values of $M_{0}=144.9$ and $k=0.184$.  Both models lead to good agreement with the experimental data, as shown in Figure \ref{solutionfig1}.

\begin{figure}[thp]
\centering
\includegraphics[width=4.0in]{vmodel.png}    
\caption{Comparison of velocity models.} \label{solutionfig1}
\end{figure}

\noindent
The position of the toy at the end of the collected data falls short of the wind-down distance $x_{0}$, which means the pull-back motor is producing torque throughout the experiment.  However, the graph of $v(t)$ for each model is concave down, suggesting that the acceleration is decreasing in each case.  In the constant-torque model, the greater moment $M_{0}$ is balanced by increased drag in terms of $k$ as the speed of the toy increases.  In contrast, the linear-torque model assumes that the torque output of the motor decreases as the internal spring winds down, which led to a much smaller value for $k$.  It is difficult to say which model is more accurate based on this information alone.
\end{proof}

\item What is the maximum speed predicted by each model?  It may be necessary to extend your numerical solution if the toy is still accelerating at the end of the observed data.

\begin{proof}[Answer:]
The maximum speed predicted by the constant-torque model is 169.5 centimeters per second, while the linear-torque model led to a maximum speed of 150.6 centimeters per second.  The position and speed predicted by the models are shown in Figure \ref{solutionfig2}. 

\begin{figure}[thp]
\centering
\includegraphics[width=4.0in]{fullrun.png}    
\caption{Comparison of extended model predictions.} \label{solutionfig2}
\end{figure}

\noindent
Looking at Figure \ref{solutionfig2}, it appears that in the linear-torque model, the toy has already reached its maximum speed by the end of the experiment.  It is also clear that the two models estimate completely different levels of drag.
\end{proof}

\item What is the maximum distance that the pull-back toy can travel under the power of the pull-back motor?  As above, you will likely need to extend your numerical solution to answer this question.

\begin{proof}[Answer:]
The constant-torque model predicts a maximum distance of 432 centimeters, while the linear-torque model predicts a whopping 961 centimeters!  The fact that the models do not agree here should provide a practical means to determine which model is more accurate.
\end{proof}

\item How far can the pull-back toy actually roll?  Make a few tests and compare the results with the mathematical models.  Does this information suggest which model more accurately describes the motion of the pull-back toy? (The pull-back toy of Figure \ref{truck} can roll somewhere between 400 and 500 \texttt{cm} when fully wound.)

\begin{proof}[Answer:]
The truck of Figure \ref{truck} typically rolls between 400 and 500 centimeters when fully wound.  This agrees well with the position data shown above for the constant-torque model, thus providing convincing evidence that this model is more realistic.  Recall that the introductory paragraph explained that pull-back toys make use of a clockwork motor.  Mechanical watches rely on the nearly constant output of flat spiral springs similar to that found in a pull-back motor, so it should not be a big surprise that the constant-torque model offers a better fit.
\end{proof}
\end{enumerate}

%\begin{thebibliography}{99}
%\end{thebibliography}
}

\end{document}