Radar Tracking of a Moving Object

Off[General::spell,General::spell1,Part::"partd",ParametricPlot::"plld"];

Introduction

OBJECTIVE: Explore how to compute velocity and acceleration of a moving object whose position is given in polar coordinates. Animate the trajectory of a moving object together with its position, velocity, and acceleration vectors.

In many practical applications, including the radar detection of a moving object, the position of an object is specified in polar coordinates with an angle and a distance. In this module, you will learn how to convert the position specification from polar coordinates to Cartesian coordinates and how to calculate the velocity and acceleration vectors. Animations are used to study several different motions, showing the object's position, velocity, and acceleration vectors as time progresses.

Technology Guidelines

NOTE:  If you have just finished a module, restart Mathematica or Quit Kernel under the Evaluation pull-down menu before executing a new module.
TO OPEN CELLS, click on the arrow to the left of the cell or put your cursor on the right cell bracket and double click. To open all cells, highlight the bracket on the far right and select Grouping under the Cell pull-down menu and select Open All Subgroups.
TO STOP AN EXECUTION
Select the Evaluation pull-down menu and click on Abort Evaluation.
ORDER OF EXECUTION
Execute cells in the order given. Do not skip any Input cells within a given notebook.
SAVING NOTEBOOKS
You can save anytime to any directory you choose, and it is wise to save often. However, before you do your final save to reduce the size of your file, it is a good idea to delete all your output by selecting the Delete All Output selection under the Cell pull-down menu.
EXPERIENCING MAJOR PROBLEMS
Save if appropriate, then shut down Mathematica and start it up again.

Part I: Converting from Polar to Cartesian Coordinates

Cartesian Coordinates

The location of an object in a two-dimensional plane can be specified with two coordinates, x and y. These are the familiar Cartesian coordinates of a point in a plane. When the Cartesian coordinate values are placed in an array like this, ⟨x, y⟩, the array is called a position vector, and it is denoted by the symbol r. That is, r = ⟨x, y⟩.  

The order of the entries in a vector is important. The position ⟨1, 2⟩ is different from the position ⟨2, 1⟩.  Note that r, the symbol used to represent the vector, is a bold, lowercase letter. In contrast, x and y, the symbols used to represent the single numbers in the vector, are in italics and are not bold. The numbers x and y are called the components of the vector. An alternative notation for a position vector, typically used in physics and engineering, is r = x i + y j. This representation of the position vector contains exactly the same information as the ⟨x, y⟩ notation, but represents it in a different way.

Geometrically, a position vector, r, is shown as an arrow in the Cartesian plane, extending from the origin to the position with coordinates x and y, as shown in the next figure.

For further exploration of moving objects in Cartesian coordinates, refer to "Projectile Motion," a JAVA applet included in this supplement.

Polar Coordinates

Another natural way to specify the position of an object in a plane is with polar coordinates. One application of polar coordinates is in the use of radar (radio-detecting-and-ranging) to track a moving object. Radar tracks an object by bouncing a radio frequency light wave off of the object to measure its distance from the radar detector and its angular position relative to some fixed reference line through the detector.

The angle, θ, is positive if it is counterclockwise from the fixed reference line and negative if it is clockwise. 

Using polar coordinates, we specify positions or points in a plane by a distance r from some fixed reference point, called the pole, and an angle θ from a fixed reference line through the pole. The values of r and θ are called the polar coordinates of the position or point.

Converting from Polar to Cartesian Coordinates

Given the location of an object specified in polar coordinates, we would like to find its Cartesian coordinates. Therefore, we write a pair of transformation equations that will convert a pair of polar coordinates (r, θ) into Cartesian coordinates (x, y). The positive x-axis in the Cartesian reference frame is taken to be along the polar reference line with the origin at the pole, and the positive y-axis is in the polar direction, θ = (π/2). In addition, we treat the variables r and θ as parametric functions of time. If r=r(t) and θ=θ(t), then the transformation equations are:

Clear[r,θ,x,y];
x[t_]=r[t]*Cos[θ[t]]
y[t_]=r[t]*Sin[θ[t]]

Let's consider an example. First, we specify the position of an object in polar coordinates.

r[t_]=t;
θ[t_]=t^2;
rvectorpolar[t_]={r[t],θ[t]}

And we convert the position to a vector in Cartesian coordinates using the transformation equations that we defined above.

rvectorCartesian[t_]={x[t],y[t]}

You Try It: Part I

Given the following time functions for the polar coordinates of a moving object, form expressions for the vector position of the object in polar and Cartesian coordinates.

Clear[r,θ,rvectorpolar, rvectorCartesian];
r[t_]=((Sin[t])^2)
θ[t_]=2t

Part II: Position, Velocity, Speed, and Direction

Now that we have a vector expression for the position vector in terms of r[t] and θ[t], we can determine the velocity, speed, and direction of travel for the moving object. Here we express the position in Cartesian coordinates.

Clear[r,θ,x,y];
x[t_]=r[t]Cos[θ[t]];
y[t_]=r[t]Sin[θ[t]];
rvectorCartesian[t_]={x[t],y[t]}

If a radar detector is tracking a moving object, then r and θ vary with time. The derivative (dx/dt) measures the rate of change of the x coordinate of the object. This derivative is called the velocity of the object in the x direction and is denoted by (Subscript[v, x]). Similarly, (dy/dt) is the rate of change of the y coordinate of the object; it is called the velocity of the object in the y direction and is denoted by (Subscript[v, y]). Next, we determine expressions for (Subscript[v, x]) and (Subscript[v, y]) in terms of r and θ and their time derivatives, and write a vector expression for the velocity vector.

(Subscript[v, x])[t_]=x'[t]

(Subscript[v, y])[t_]=y'[t]

vvectorCartesian[t_]={(Subscript[v, x])[t],(Subscript[v, y])[t]}

Or, more simply, we can take the time derivative of the position vector, rvector[t].

vvectorCartesian[t_]=D[rvectorCartesian[t],t]

The speed of the object is the magnitude of the velocity vector. First, we define a function to calculate the magnitude of a vector, and then we use it to calculate the speed of the moving object.

magnitude[vec_List]=(Sqrt[vec[[1]]^2+vec[[2]]^2])

We use magnitude[ ] to find the speed of the object.

speed[t_]=magnitude[vvectorCartesian[t]]//Simplify

The direction of motion of the object is the velocity divided by the speed.

vdirection[t_]=vvectorCartesian[t]/speed[t]//Simplify

The magnitude of the position vector, rvectorCartesian[t], is the distance of the object or point from the pole.

Simplify[magnitude[rvectorCartesian[t]]]

And the direction of the position vector is the unit vector in the direction of rvectorCartesian[t].

rdirection[t_]=Simplify[rvectorCartesian[t]/magnitude[rvectorCartesian[t]]]

Part III: A Specific Trajectory

The path of motion of a moving object is called its trajectory. Let's plot the trajectory of an object. First, we define a position function in terms of the parametric functions r[t] and θ[t] and then graph the trajectory.

r[t_]=0.5*t

θ[t_]=0.5*t^(5/4)

x[t_]=r[t]*Cos[θ[t]]

y[t_]=r[t]*Sin[θ[t]]

rvectorCartesian[t_]={x[t],y[t]}

ParametricPlot[Evaluate[rvectorCartesian[t]],{t,0,15},AspectRatio->1,AxesLabel->{"x","y"}]

Part IV: Visualizing Position, Velocity, and Acceleration

In Mathematica, the Epilog option is very useful for adding things to graphs. In this case, we will use the Epilog option to add the position vector to the parametric plot of the trajectory. 

While the animation is playing, a control bar appears at the top of the display. This bar allows you to control the speed and direction of the animation.

window=12;timelimit=15;

rvectorCartesian[t]

vvectorCartesian[t_]=D[rvectorCartesian[t],t]

Animate[ParametricPlot[Evaluate[rvectorCartesian[u]],{u,0,t},AspectRatio->1,PlotRange->{{-window,window},{-window,window}},AxesLabel->{"x","y"},Epilog->{RGBColor[0,0,1],Arrow[{{0,0},rvectorCartesian[t]}]}],{t,0,timelimit,(timelimit/40)}]

Now let's add the velocity vector to the animation. We want the tail of the velocity vector to be at the head of the position vector; therefore, the arrow should be drawn from rvectorCartesian[t] to rvectorCartesian[t] + vvectorCartesian[t].

Animate[ParametricPlot[Evaluate[rvectorCartesian[u]],{u,0,t},AspectRatio->1,PlotRange->{{-window,window},{-window,window}},AxesLabel->{"x","y"},Epilog->{RGBColor[0,0,1],Arrow[{{0,0},rvectorCartesian[t]}],RGBColor[1,0,0],Arrow[{rvectorCartesian[t],rvectorCartesian[t]+vvectorCartesian[t]}]}],{t,0,timelimit,(timelimit/40)}]

What the heck, why not add the acceleration?

avectorCartesian[t_]=D[vvectorCartesian[t],t]

Animate[ParametricPlot[{x[u],y[u]},{u,0,t},AspectRatio->1,PlotRange->{{-window,window},{-window,window}},AxesLabel->{"x","y"},Epilog->{RGBColor[0,0,1],Arrow[{{0,0},rvectorCartesian[t]}],RGBColor[1,0,0],Arrow[{rvectorCartesian[t],rvectorCartesian[t]+vvectorCartesian[t]}],RGBColor[0,1,0],Arrow[{rvectorCartesian[t],rvectorCartesian[t]+avectorCartesian[t]}]}],{t,0,timelimit,(timelimit/40)}]

Part V: Speeding Up or Slowing Down? Turning Left or Turning Right?

A few things are worth noting at this point: 
1) The velocity is always along the tangent to the path of motion. 
2) The acceleration has a nonzero component in the direction of the velocity. We show this by plotting the dot or scalar product of the acceleration vector with the unit vector in the direction of the velocity over the interval of time during the motion. This gives the component of the acceleration in the direction of the velocity, which we call (Subscript[a, vel]).

Plot[avectorCartesian[t].vdirection[t],{t,0,timelimit},PlotRange->{0,1},AxesLabel->{"t","(Subscript[a, vel])"}]

You should note that (Subscript[a, vel]) is always positive, indicating that the component of the acceleration along the line of the velocity is, in fact, in the same direction as the velocity (instead of opposite it, as would be the case if the dot product were negative). Whenever this situation occurs, the object is speeding up. If the dot product is negative, then the acceleration has a component in the direction opposite that of the velocity, and the object is slowing down.
3) The object turns in the direction of the component of the acceleration that is perpendicular to the velocity. In the preceding example, the object is turning to the left, and the acceleration points to the left. The opposite is true when the object is turning to the right.

You Try It: Part V

Change the polar coordinate functions r[t] and θ[t] to generate the following motions.

1. The same motion in Part IV, with the spiral turning clockwise instead of counterclockwise.

2. The same motion as in Part IV, with the r-coordinate starting at 10 and decreasing at the same rate it was increasing in Part IV.

3. For each motion, use the plot of (Subscript[a, vel]) to indicate whether the object is speeding up or slowing down.

To assist you, we copy the commands you need in the following cells. Change the entries that are highlighted in red, and execute the commands in all of the cells that follow.

r[t_]=0.5*t

θ[t_]=0.5*t^(5/4)

x[t_]=r[t]*Cos[θ[t]]
y[t_]=r[t]*Sin[θ[t]]

rvectorCartesian[t_]={x[t],y[t]}
vvectorCartesian[t_]=D[rvectorCartesian[t],t]
avectorCartesian[t_]=D[vvectorCartesian[t],t]
speed[t_]=magnitude[vvectorCartesian[t]]//Simplify
vdirection[t_]=vvectorCartesian[t]/speed[t]//Simplify

window=12;timelimit=15;
Plot[avectorCartesian[t].vdirection[t],{t,0,timelimit},AxesLabel->{"t","(Subscript[a, vel])"}]

window=12;timelimit=15;
Animate[ParametricPlot[{x[u],y[u]},{u,0,t},AspectRatio->1,PlotRange->{{-window,window},{-window,window}},AxesLabel->{"x","y"},Epilog->{RGBColor[0,0,1],Arrow[{{0,0},rvectorCartesian[t]}],RGBColor[1,0,0],Arrow[{rvectorCartesian[t],rvectorCartesian[t]+vvectorCartesian[t]}],RGBColor[0,1,0],Arrow[{rvectorCartesian[t],rvectorCartesian[t]+avectorCartesian[t]}]}],{t,0.01`,timelimit,(timelimit/40)}]

Part VI: Circular Motion

Let's put all of the commands into two cells so we can try some different curves without having to scroll back up to re-execute commands. In the first cell, we generate a parametric plot of the trajectory. From this we select values for the window size and time limit for use in the second cell, which generates the graphs for the animation.

The motion we consider as an example is along a circular path; the object moves clockwise, and it is speeding up. First, we plot the trajectory.

Clear[r,θ,x,y,rvectorCartesian,vvectorCartesian,avectorCartesian];
timelimit=((16 π)/3);
θ[t_]=-0.05` (t^2);
r[t_]=5;
x[t_]=r[t] Cos[θ[t]];
y[t_]=r[t] Sin[θ[t]];
rvectorCartesian[t_]={x[t],y[t]};
ParametricPlot[Evaluate[rvectorCartesian[t]],{t,0,timelimit},AspectRatio->1,AxesLabel->{"x","y"}]

window=12;
vvectorCartesian[t_]=(∂_t)rvectorCartesian[t]
avectorCartesian[t_]=(∂_t)vvectorCartesian[t]
speed[t_]=Simplify[magnitude[vvectorCartesian[t]]]
vdirection[t_]=Simplify[((vvectorCartesian[t])/(speed[t]))]
Plot[avectorCartesian[t].vdirection[t],{t,0,timelimit},PlotRange->{0,1},AxesLabel->{"t","(Subscript[a, vel])"}]

Next, we animate the motion showing the position, velocity, and acceleration vectors on the moving point.

Animate[ParametricPlot[Evaluate[rvectorCartesian[u]],{u,0,t},AspectRatio->1,PlotRange->{{-window,window},{-window,window}},AxesLabel->{"x","y"},Epilog->{RGBColor[0,0,1],Arrow[{{0,0},rvectorCartesian[t]}],RGBColor[1,0,0],Arrow[{rvectorCartesian[t],rvectorCartesian[t]+vvectorCartesian[t]}],RGBColor[0,1,0],Arrow[{rvectorCartesian[t],rvectorCartesian[t]+avectorCartesian[t]}]}],{t,0,timelimit,(timelimit/40)}]

You Try It: Part VI

Change the polar coordinate functions r[t] and θ[t] to generate the following motions.

1. A counterclockwise circular path with a radius of 10 and the angle θ[t] increasing the same way it did in Part IV.

2. A clockwise circular path with a radius of 10 and the angle θ[t] decreasing at the same rate it was increasing in Part IV.

3. Try this one: r(t)=10 and θ(t)=t(14-t)/12. What do you notice about the component of the acceleration in the direction of the velocity? When is the component of the acceleration that is perpendicular to the velocity the largest? When is it the smallest? Is the velocity vector ever equal to the zero-vector? Is the acceleration vector ever equal to the zero-vector?

4. For each motion, use the plot of (Subscript[a, vel]) to indicate whether the object is speeding up or slowing down.

To assist you, we copy the commands you need in the following cells. Change the entries that are highlighted in red, and execute the commands in all of the cells that follow. Note that you may need to change the range for plotting your acceleration (in red).

Clear[r,θ,x,y,rvectorCartesian,vvectorCartesian,avectorCartesian];
timelimit=((16 π)/3);
θ[t_]=-0.05` (t^2);
r[t_]=5;
x[t_]=r[t] Cos[θ[t]];
y[t_]=r[t] Sin[θ[t]];
rvectorCartesian[t_]={x[t],y[t]};
ParametricPlot[Evaluate[rvectorCartesian[t]],{t,0,timelimit},AspectRatio->1,AxesLabel->{"x","y"}]

window=12;
vvectorCartesian[t_]=(∂_t)rvectorCartesian[t]
avectorCartesian[t_]=(∂_t)vvectorCartesian[t]
speed[t_]=Simplify[magnitude[vvectorCartesian[t]]]
vdirection[t_]=Simplify[((vvectorCartesian[t])/(speed[t]))]
Plot[avectorCartesian[t].vdirection[t],{t,0,timelimit},PlotRange->{0,1},AxesLabel->{"t","(Subscript[a, vel])"}]

Animate[ParametricPlot[Evaluate[rvectorCartesian[u]],{u,0,t},AspectRatio->1,PlotRange->{{-window,window},{-window,window}},AxesLabel->{"x","y"},Epilog->{RGBColor[0,0,1],Arrow[{{0,0},rvectorCartesian[t]}],RGBColor[1,0,0],Arrow[{rvectorCartesian[t],rvectorCartesian[t]+vvectorCartesian[t]}],RGBColor[0,1,0],Arrow[{rvectorCartesian[t],rvectorCartesian[t]+avectorCartesian[t]}]}],{t,0,timelimit,(timelimit/40)}]