<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />

# 6.4: Analyzing Railgun Data Using For Loops

Difficulty Level: At Grade Created by: CK-12

This example requires an understanding of the relationships between acceleration and velocity of an object moving in a straight line. A clear discussion of this relationship can be found in "Acceleration" http://cnx.org/content/m13769/latest/ the Wikipedia article "Motion Graphs and Derivatives" http://en.wikipedia.org/wiki/Motion_graphs_and_derivatives also has an explanation of this relationship as well as a discussion of average and instantaneous velocity and acceleration and the role derivatives play. Also, in this example, we will compute approximate integrals using the trapezoidal rule; the Wikipedia article "Trapezium rule" http://en.wikipedia.org/wiki/Trapezoidal_rule has an explanation of the trapezoidal rule.

## Velocity Analysis of an Experimental Rail Gun

A railgun is a device that uses electrical energy to accelerate a projectile; information about railguns can be found at the Wikipedia article "Railgun" http://en.wikipedia.org/wiki/Railgun The paper "Effect of Railgun Electrodynamics on Projectile Launch Dynamics" by Zielinski shows the current profile of a railgun launch. The acelleration \begin{align*}a\end{align*} of the projectile (in units of \begin{align*}\tfrac{m}{s^2}\end{align*} ) is a function of the current \begin{align*}c\end{align*} through the projectile (in units of kAmp). This function is given by the equation

\begin{align*}a = 0.0036 c^2 \textrm{sgn}(c)\end{align*}

where \begin{align*}\textrm{sgn}(c)\end{align*} is \begin{align*}1\end{align*} if \begin{align*}c > 0\end{align*} and \begin{align*}-1\end{align*} if \begin{align*}c < 0\end{align*}.

Exercise 23

Download the data set of current values in the file Current.txt (available at http://cnx.org/content/m14031/latest/Current.txt onto your computer. The file is formatted as two columns: the first column is time in miliseconds, and the second column is current in kA.

The following sequence of commands will load the data, create a vector

t


of time values, create a vector

c


of current values, and plot the current as a function of time.

load Current.txt -ascii

t = Current(:,1);

c = Current(:,2);

plot(t,c)

xlabel('time (msec)')

ylabel('current (kA)')


The plot should be similar to that in Figure 6.

Plot of railgun current versus time

Exercise 24:

Compute the projectile velocity as a function of time. Note that velocity is the integral of acceleration.

### Notes/Highlights Having trouble? Report an issue.

Color Highlighted Text Notes
Please to create your own Highlights / Notes

Show Hide Details
Description
Tags:
Subjects: