Está en la página 1de 101

Density Analysis of the HIT-SI Spheromak

Brian Scott Victor


A thesis submitted in partial fulllment
of the requirements for the degree of
Master of Science in Aeronautics and Astronautics
University of Washington
2009
Program Authorized to Oer Degree:
Aeronautics and Astronautics
University of Washington
Graduate School
This is to certify that I have examined this copy of a masters thesis by
Brian Scott Victor
and have found that it is complete and satisfactory in all respects,
and that any and all revisions required by the nal
examining committee have been made.
Committee Members:
Thomas R. Jarboe
Brian A. Nelson
Date:
In presenting this thesis in partial fulllment of the requirements for a masters
degree at the University of Washington, I agree that the Library shall make its copies
freely available for inspection. I further agree that extensive copying of this thesis is
allowable only for scholarly purposes, consistent with fair use as prescribed in the
U.S. Copyright Law. Any other reproduction for any purpose or by any means shall
not be allowed without my written permission.
Signature
Date
University of Washington
Abstract
Density Analysis of the HIT-SI Spheromak
Brian Scott Victor
Chair of the Supervisory Committee:
Professor Thomas R. Jarboe
Aeronautics and Astronautics
The Helicity Injected Torus with Steady-state Inductive drive (HIT-SI) is a novel
magnetic connement conguration for a spheromak plasma. Through the use of
two inductive plasma injectors, helicity is injected into the connement region at a
constant rate.
A far-infrared (FIR) interferometer is used to measure the line-integrated density
of the plasma. An overview of the FIR system is discussed, including work to reduce
the electrical noise to less than 20% of the previous level.
Plasma density is compared to the pressure of the initial neutral ll gasused
for pre-ionizationand the neutral pu gasused to fuel the plasma injectorsto
characterize the operational regime. Based upon the high initial plasma density due
to the background ll gas and the subsequent decrease in density, particle connement
times between 0.5 and 1.5 ms are calculated. Connement times averaging 1.5 ms
were calculated by comparing the pu gas particle injection rate to the period of
relatively constant plasma density. Increases in the plasma density in the second half
of the shot are correlated to increases in the spheromak current. Finally, the ratio of
spheromak current density to line-averaged plasma density, with values of j/n up to
4.9 10
15
Am, yields a gure of merit for plasma performance.
TABLE OF CONTENTS
Page
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Chapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Importance of Current Drive . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Plasma Current Drive . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 HIT-SI Current Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Chapter 2: Overview of the HIT-SI Device . . . . . . . . . . . . . . . . . . 5
2.1 Steady Inductive Helicity Injection . . . . . . . . . . . . . . . . . . . 6
2.2 Current Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Chapter 3: Gas Injection System . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1 Fill Gas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Pu Gas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Chapter 4: HIT-SI Far Infrared (FIR) Interferometry . . . . . . . . . . . . 14
4.1 Dispersion Relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2 FIR System Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chapter 5: Reducing Noise Pickup in the FIR Detectors . . . . . . . . . . . 20
5.1 Improved SNR on the Scene Detector . . . . . . . . . . . . . . . . . . 20
5.2 Reference Detector Noise . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.3 Software Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Chapter 6: Results of Density Analysis . . . . . . . . . . . . . . . . . . . . 23
6.1 Typical Density Prole Divided into Three Regions . . . . . . . . . . 23
i
6.2 Qualitative Agreement between Plasma Current and Density Fluctua-
tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.3 Plasma Performance in Relation to the Greenwald Limit . . . . . . . 32
Chapter 7: Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Chapter 8: Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.1 Gas Pressure Measurement . . . . . . . . . . . . . . . . . . . . . . . . 36
8.2 FIR Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.3 Machine Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Appendix A: Tables of HIT-SI Density Data . . . . . . . . . . . . . . . . . . 39
Appendix B: Description of the Two Cavity FIR Laser System . . . . . . . . 43
B.1 General Overview of the Two Cavity FIR Laser System . . . . . . . . 43
B.2 Standard Operating Procedures . . . . . . . . . . . . . . . . . . . . . 44
B.3 Recent Changes to the FIR System . . . . . . . . . . . . . . . . . . . 50
Appendix C: Pu Gas Measurements . . . . . . . . . . . . . . . . . . . . . . 51
C.1 Calculating the Plenum Volume . . . . . . . . . . . . . . . . . . . . . 51
C.2 The Initial Number of Particles in the Plenum . . . . . . . . . . . . . 52
C.3 Pu Plenum Pressure as a Function of Time . . . . . . . . . . . . . . 52
C.4 Operational Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Appendix D: Electrical Noise Troubleshooting the FIR Signal Detection System 54
D.1 Scene Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
D.2 Reference Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Appendix E: Matlab Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
E.1 Density Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
E.2 Tau Based Upon Plateau Density . . . . . . . . . . . . . . . . . . . . 75
E.3 Tau Based Upon Density Decay Region . . . . . . . . . . . . . . . . . 83
E.4 j/n Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
ii
LIST OF FIGURES
Figure Number Page
1.1 Current drive in a z-pinch . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Magnetic eld generation in a tokamak . . . . . . . . . . . . . . . . . 2
1.3 Formation of a spheromak using coaxial helicity injection (CHI) . . . 3
2.1 Cross section of HIT-SI. Drawing by John Rogers and Paul Sieck . . 5
2.2 Injector coils on HIT-SI. Drawing by John Rogers and Paul Sieck . . 6
2.3 Current drive on HIT-SI . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 Top: injector voltage (V). Middle: injector ux (Wb). Bottom: sphero-
mak current (A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1 Gas injection points. Drawing by John Rogers and Paul Sieck . . . . 10
3.2 Pu gas injection system . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.3 X-injector pressure transducer reading . . . . . . . . . . . . . . . . . 12
3.4 Y-injector pressure transducer reading . . . . . . . . . . . . . . . . . 12
4.1 Layout of the FIR interferometry system . . . . . . . . . . . . . . . . 16
4.2 Master laser path through the connement region . . . . . . . . . . . 19
5.1 The 5.8 kHz noise that dominated the blue signal was reduced (red
signal) through the construction of a new scene detector . . . . . . . 21
5.2 The new enclosure houses the Schottky diode, pre-amplier, and amplier 21
5.3 Faraday cage further reduces electrostatic noise pickup on the scene
signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.1 Regions of the HIT-SI density prole . . . . . . . . . . . . . . . . . . 24
6.2 Peak density correlation to ll gas: all shots are taken with a pu
pressure of 1000 Torr . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.3 Shot 114361: Exponential t to the density decay region . . . . . . . 28
6.4 Plateau density dependence on ll gas pressure: all shots are taken
with a pu pressure of 1000 Torr . . . . . . . . . . . . . . . . . . . . 30
6.5 Particle connement time based upon plateau density . . . . . . . . . 31
iii
6.6 Density and current for shot 114476 . . . . . . . . . . . . . . . . . . . 32
6.7 Density and current for shot 114476 . . . . . . . . . . . . . . . . . . . 32
6.8 j/n is Greatest for High Voltage Shots without Fill Gas . . . . . . . . 34
iv
LIST OF TABLES
Table Number Page
3.1 Average particle ow rate from 4.2 to 7.2 ms [10
20
s
1
] . . . . . . . . 13
4.1 Machine dimensions and beam path through the connement region . 19
A.1 Calculated Values from Density Data, HIT-SI Shots 114073 - 114075 . 39
A.2 Calculated Values from Density Data, HIT-SI Shots 114077 - 114460 . 40
A.3 Calculated Values from Density Data, HIT-SI Shots 114461 - 114652 . 41
A.4 Calculated Values from Density Data, HIT-SI Shots 114659 - 114699 . 42
v
ACKNOWLEDGMENTS
I would like to thank my advisor Tom Jarboe for giving me the opportunity to
work on this project, Roger Smith and Cihan Akcay for teaching me the workings
the interferometer, and George Andexler for his technical support and knowledge. I
would also like to acknowledge David Ennis, John Rogers, Brian Nelson, and Will
Hamp for their help and advice.
vi
1
Chapter 1
INTRODUCTION
1.1 Importance of Current Drive
Magnetic elds are used to conne plasmas at high enough temperatures for fusion to
occur. Due to the high temperatures reached in a reactor, contact with material walls
contaminates and degrades the plasma. In magnetic connement devices, internal
plasma currents help to heat and conne the plasma. Plasmas Ohmically heat through
current drive in a similar way to a light bulb heating when current is driven through
the lament. Magnetic eld pressure balances particle pressure to conne the plasma.
Plasma currents are typically formed in one of two ways: through electrodes or by
making the plasma the secondary of a transformer and creating a loop voltage.
1.2 Plasma Current Drive
In 1-D congurations, such as z-pinches, electrodes are used at the ends of the con-
nement volume and the voltage potential drives current through the plasma as can
be seen in Fig. 1.1. Z-pinches generate closed magnetic ux, but are susceptible to
sausage and kink instabilities [1]. Adding a magnetic eld parallel to the current
helps to stabilize the conguration at the cost of creating open eld lines.
2
Figure 1.1: Current drive in a z-pinch [2]
2-D congurations eliminate open eld lines by connecting the two ends of the
cylinder and creating a torus. Driving plasma current in a toroidal device presents
some diculties. First of all, the toroidal nature of the device prevents the use of
electrodes. Tokamaks drive plasma current with a central solenoid, where the plasma
acts as the transformer secondary [3]. However, this has only been eective in pulsed
operation. AC operation of the central solenoid has been attempted [4], but plasma
containment has not been shown through the current direction reversal.
Figure 1.2: Magnetic eld generation in a tokamak [3]
3
HIT-SI is a magnetic connement conguration known as a spheromak [5]. Sphero-
maks are advantageous over toroidal devices in that they are topologically spherical
and do not require external toroidal eld coils. One method for creating a spheromak
is called Coaxial Helicity Injection (CHI). In CHI spheromaks helicity is injected as
shown in Fig. 1.3. A solenoid, inside the inner electrode, generates vacuum magnetic
eld lines between the inner and outer electrodes [6]. Gas is injected and current is
driven between the inner and outer electrodes along the vacuum eld lines. Toroidal
Figure 1.3: Formation of a spheromak using coaxial helicity injection (CHI) [7]
4
magnetic elds encircling the inner electrode are formed from this current and, as
the magnetic eld line density increases, the pressure forces the plasma into the tuna
can ux conserver. The vacuum eld lines form into poloidal eld lines, which drive
toroidal current in the plasma. Eventually the eld lines are stretched to the breaking
point and reconnection occurs. The resulting conguration is a spheromak.
1.3 HIT-SI Current Drive
As will be explained in more detail in the next chapter, HIT-SI uses Steady Inductive
Helicity Injection (SIHI) [8, 9] to inject helicity into a bow tie shaped ux conserver.
Through helicity conservation and magnetic relaxation to the eigenstate of the ux
conserver, toroidal plasma current is formed. The constant inux of helicity to the
ux conserver allows for steady-state operation without the use of electrodes.
5
Chapter 2
OVERVIEW OF THE HIT-SI DEVICE
Figure 2.1: Cross section of HIT-SI. Drawing by John Rogers and Paul Sieck
The Helicity Injected Torus with Steady Inductive drive (HIT-SI) is a novel ap-
proach for injecting magnetic helicity to form and sustain a spheromak. Using Steady
Inductive Helicity Injection (SIHI) [8, 9], a DC plasma current is generated and formed
in the bow-tie ux conserver from AC driven plasma injectors. Figure 2.1 shows the
bow-tie ux conserver, housing the spheromak connement region, in teal and red,
and the two injectors in yellow and blue. The injectors act as 180

sections of a large
aspect ratio reversed eld pinch (RFP) that connect to the spheromak connement
volume. The connement region is bow tie shaped to increase the MHD limit for
6
the spheromak equilibrium [10].
2.1 Steady Inductive Helicity Injection
Each plasma injector has a voltage and ux coil to generate magnetic helicity. The
solenoidal-shaped ux coil (right side of Fig. 2.2) establishes ux through the sphero-
mak connement volume, and the voltage coil (left side of Fig. 2.2) induces a current
along this ux.
Voltage Coils Flux Coils
Figure 2.2: Injector coils on HIT-SI. Drawing by John Rogers and Paul Sieck
7
The helicity injection rate is given by Eq. 2.1 [5]

K = 2V
inj

inj
(2.1)
where V
inj
is the voltage in the voltage coils and
inj
is the ux in the ux coils. The
voltage and ux coils on a given injector are driven in phase, generating a positive
helicity injection rate at all times
V
inj
= V
max
sin(t) (2.2)

inj
=
max
sin(t) (2.3)

K = 2V
max

max
sin
2
(t) (2.4)
where = 2f and f is the injector frequency, 5.8 kHz for the data in this thesis. The
injectors are driven 90

out of phase for constant helicity injection when the injectors


operate at equal voltage and uxes.

K = 2V
max

max
(cos
2
(t) + sin
2
(t)) = 2V
max

max
(2.5)
8
2.2 Current Drive
Figure 2.3 is a conceptual drawing of the magnetic eld lines in HIT-SI. The red lines
are the eld lines generated by a given ux coil. Current is driven along these eld
lines to inject helicity. Through magnetic relaxation, the blue eld lines form as the
magnetic helicity relaxes to its lowest energy state, known as a Taylor state [11]. This
relaxation drives the DC spheromak current.
Figure 2.3: Current drive on HIT-SI [12]
Figure 2.4 shows the injector voltage and ux signals and the resulting spheromak
current for shot 114698.
9
X-injector in black. Y-injector in red.
Figure 2.4: Top: injector voltage (V). Middle: injector ux (Wb). Bottom: sphero-
mak current (A)
10
Chapter 3
GAS INJECTION SYSTEM
There are two methods of gas injection, one into the connement region and one
into the midpoint of each injector. Gas injected into the connement region, used for
pre-ionization, maintains the vacuum vessel at a constant pressure, typically around 2
mTorr. This gas is known as ll gas. Gas injected into the midpoint of each injector
fuels the plasma injectors during the course of the shot. This gas is known as pu
gas. The injection locations are shown in Fig. 3.1 below.
Figure 3.1: Gas injection points. Drawing by John Rogers and Paul Sieck
Red = Fill, Blue = Pu
11
3.1 Fill Gas
The ll gas maintains the vacuum region at a constant pressure and is used for pre-
ionization. During low voltage shots, V
inj
< 350 V , pre-ionization is needed for gas
breakdown. Typically a ll gas pressure of 2 mTorr is used; however, higher ll gas
pressures are possible. At higher voltages, V
inj
350 V , the voltage itself is enough
to achieve breakdown, and the ll gas is no longer needed.
3.2 Pu Gas
Pu gas fuels the plasma injectors. Without pu gas the injectors would become
starved, limiting the injector current and decreasing the helicity injection rate. The
layout of the pu gas injection system can be seen in Fig. 3.2.
Figure 3.2: Pu gas injection system
For a typical shot, the feed gas throttle is opened to ll the plenum, shown in red
in Fig. 3.2, to the main gas supply pressure, typically 1000 to 5000 Torr. Shortly
before the beginning of the shot, the solenoid valve is opened allowing He gas at 100
12
psi to begin owing. This gas, owing through the area shown in blue in Fig. 3.2,
opens and closes the valves and is not injected into the machine. The increase in
pressure opens the N/C valve and then, a short time later, closes the N/O valve.
The interval between the opening of the N/C valve and the closing of the N/O valve
is set by the control gas throttle. After the completion of the shot, the burp valve
is opened, returning the N/C valve to the closed position and the N/O valve to the
opened position. The following pressure measurements, Fig. 3.3 and Fig. 3.4, show the
pressure transducer readings for the X and Y side injectors at dierent pu plenum
pressures: blue is 5000 Torr, red is 3000 Torr, green is 2000 Torr, and black is 1000
Torr. For information on how this measurement was taken see Appendix C.
Blue = 5000 Torr Red = 3000 Torr
Green = 2000 Torr Black = 1000 Torr
Figure 3.3: X-injector pressure trans-
ducer reading
Figure 3.4: Y-injector pressure trans-
ducer reading
In Fig. 3.3 and Fig. 3.4 each initial plenum pressure shows two curves: one solid
and one dashed. Time zero represents the beginning of the shot, and the end of the
shot is at eight milliseconds for all of the shots in this thesis. The solid curve is the
13
reading with the N/O valve left open. The dashed curve represents the operation
of the pu gas injection system for the data taken in this thesis. The separation
between the solid and dashed curves occurs when the N/O valve begins to close. The
premature closing of the N/O valve was limiting the injector current late in the shot
and was corrected after the data in this thesis was taken (shot 115106).
Assuming that the ow rate is proportional to the pressure transducer signal,
integrating the signal with the feed gas throttle closed and the N/O valve left open
gives a number proportional to the total number of particles in the plenum.

Pdt N
plenum
(3.1)
P = K
dN
dt
(3.2)
where N
plenum
is the total number of particles in the plenum as calculated in Ap-
pendix C, and K is the constant of proportionality to convert between the pres-
sure transducer signal and the particle ow rate. Table 3.1 lists the average par-
ticle ow rates from 4.2 to 7.2 ms for the operating pressures used in this thesis.
4.2 and 7.2 ms were chosen because the density for a given shot is relatively con-
stant during this time period. This calculation was made using the MATLAB code
puff_data_integrate3.m, which can be found in Appendix E. Finally, since He is
used as the operating gas, the electron ow rate is twice that of the particle ow rate.
Table 3.1: Average particle ow rate from 4.2 to 7.2 ms [10
20
s
1
]
Initial Pu Pressure X-Injector Y-Injector
5000 Torr 17 25
3000 Torr 11 15
2000 Torr 7.2 10
1000 Torr 3.7 5.5
14
Chapter 4
HIT-SI FAR INFRARED (FIR) INTERFEROMETRY
Interferometry measures phase shifts of a coherent light source caused by electro-
magnetic waves in the plasma. This technique provides a non-perturbative, phase-
based method of measuring the chord-averaged electron density. This is advantageous
over perturbative diagnostics, such as the Langmuir probe, which can have deleterious
eects on the plasma performance. Due to the phase-based nature of interferometry,
the measurement can be made without calibration. One disadvantage of interferom-
etry, however, is that it does not provide a local measurement.
4.1 Dispersion Relation
For a plasma with an electron cyclotron frequency,
ce
, negligible compared to the
frequency of the probing laser light source,
ce
/ 0, the index of refraction is given
as [13]
N
2
= 1

2
p

2
(4.1)
where
p
=

nee
2

0
me
, the plasma frequency, and is the frequency of the light source.
Using a binomial series, this can be rewritten as
N = 1
1
2

2
p

2
+
3
8

4
p

4
+. . . (4.2)
For
p
and using the denition of
p
from above, this equation can be approxi-
mated as
N = 1
1
2
n
e
e
2

0
m
e

2
(4.3)
15
where n
e
is the electron density, e is the electronic charge,
0
is the permittivity
of free space, and m
e
is the electron mass. The phase dierence measured by the
interferometer is given by
=

N 1

dl (4.4)
where is the laser wavelength. For a double-pass system, using the value of the
index of refraction from above gives
=

n
e
e
2

0
m
e

dl (4.5)
Noting that =
2c

, writing in radians, and rearranging the above equation gives


the line-integrated density as

n
e
dl =
2
0
m
e
c
2
e
2
(4.6)
where the right-hand side of the equation is constant except , which is the phase
change between the master and slave laser measured by the interferometer. It is
common to report data as the line-averaged density, which is dened as
n
e
=

n
e
dl
L
(4.7)
where L is the chord length through the plasma. The frequency of the master laser
beam is aected by changes in the electron density, while the frequency of the slave
laser beam is relatively constant through the shot. The relative change in frequency
is the source of the phase change in Eqn. 4.6.
Knowledge of the plasma density, within an order of a magnitude, is important
in selecting an appropriate laser wavelength. To balance sensitivity and accuracy
needs to be much larger than
p
while not being too large for the signal to be drowned
out by mechanical vibrations [13]. A change in of 2 is known as a fringe. For
16
HIT-SI, using n
e
10
19
m
3
, with a chord length of L 1 m, indicates must be
greater than 20 m for more than one fringe to be detected. For this reason the best
choice of wavelength is in the far-infrared spectrum, on the order of 100 m.
4.2 FIR System Layout
A heterodyne detection system is used to measure the line-integrated density. A
schematic of the HIT-SI interferometry system can be seen in Fig. 4.1. An overview
of the interferometer is given in this section and a detailed description of the system
and its operation can be found in Appendix B.
Figure 4.1: Layout of the FIR interferometry system
17
4.2.1 FIR Laser System
The FIR system consists of a CO
2
laser that optically pumps two diuoromethane
lasers. The CO
2
laser operates at 9.2 m and outputs about 60 W of power at this
wavelength. The two diuoromethane lasers, known as the master and slave lasers,
lase at 184.3 m. The master laser outputs approximately 70 mW of power and
the slave laser outputs approximately 30 mW. Due to the high frequency oscillations
of the plasma density, a beat frequency between the lasers of 3 to 4 MHz is used.
Through trial and error this frequency range was found to limit the number of fringe
jumps encountered in measuring the density.
4.2.2 FIR Signal Detection System
There are two detectors, using quasi-optical corner cube detectors connected to Schot-
tky diodes, that are used to detect the beat frequency between the master and slave
lasers. The signal at the reference detector is used as a basis of comparison for the
beat frequency between the lasers over the duration of the shot. The reference signal
is split from the main signal with a silicon mirror, which acts as a beam splitter.
This mirror, when used with the scene detectors silicon-based focusing lens, is able
to produce a large signal on the reference detector with little eect on the magnitude
of the scene detector signal.
The scene detector measures the beat frequency between the master laser, which
passes through the connement region, and the slave laser. A Martin-Puplett cong-
uration is used to achieve this [14]. The slave beam, with horizontal polarization, is
reected by the polarizing beam splitter. The beam then reects o a rooftop mirror,
oriented 45

to the axis of polarization, rotating the polarization of the scene beam


90

. The scene beam then passes through the polarizing beam splitter to the scene
detector. The master beam, with vertical polarization, passes through the polariz-
ing beam splitter. After the beam passes through the connement region, a second
18
rooftop mirror rotates the beam to horizontal polarization. When the master laser
beam is incident upon the polarizing beam splitter on its return path, it is reected
to the scene detector.
4.2.3 Beam Path through the Spheromak Connement Region
A cutaway of the spheromak connement region is shown in Fig. 4.2. The data taken
in this thesis uses a beam path that reects o the rooftop mirror above port 7,
shown by the red line in Fig. 4.2. The beam passes through a region of closed ux
as indicated by computer simulations [15]. The dimensions of the machine and beam
path are shown in Table 4.1.
19
Figure 4.2: Master laser path through the connement region
Table 4.1: Machine dimensions and beam path through the connement region
Major radius 0.5 m
Connement Volume 0.38 m
3
Volume of each injector 0.025 m
3
Impact parameter 0.35 m
Chord length 0.71 m
20
Chapter 5
REDUCING NOISE PICKUP IN THE FIR DETECTORS
Using a phase-based diagnostic lessens the deleterious eect of electrical noise
pickup. However HIT-SI is a very noisy electromagnetic environment, creating noise
which can degrade the quality of the signal to the point of making the data unusable.
There are two main sources of noise in the FIR signal. One is from the injector voltage
and ux circuits and the other the RF antenna.
5.1 Improved SNR on the Scene Detector
The largest noise source in the scene signal is from the Y-side voltage coil. The noise
pickup is at the frequency of the injectors, 5.8 kHz. To improve the signal to noise
ratio a new scene enclosure was constructed. Before the new enclosure was made,
noise from the injector dominated the beat frequency. After redesigning the scene
enclosure, the noise was signicantly reduced (see Fig. 5.1).
The new enclosure for the scene detector was designed to allow the pre-amplier
and amplier to be housed in the same enclosure as the detector (see Fig. 5.2). By
shortening the cables connecting the detector to the pre-amplier and amplier, the
noise amplitude was reduced by about 50%. Also a Faraday cage was constructed (see
Fig. 5.3) to house the scene enclosure, further reducing the noise by another 50%. The
bias supply was also moved from near the scene detector to inside the screen room in
order to eliminate the need for two enclosures near the machine.
21
Figure 5.1: The 5.8 kHz noise that dominated the blue signal was reduced (red signal)
through the construction of a new scene detector
Figure 5.2: The new enclosure houses
the Schottky diode, pre-amplier, and
amplier
Figure 5.3: Faraday cage further re-
duces electrostatic noise pickup on the
scene signal
22
5.2 Reference Detector Noise
The reference signal contained noise from the injector voltage circuit because of ground
loops in the system. This was largely eliminated by removing ground loops that
existed on the laser table. Power to components on the laser table were grounded
in multiple places. This was remedied by taking all of the power to the laser table
through a transformer (to ensure that the power signal is clean) and grounding the
table to the screen room, which is located next to the laser table. The power supply
for the reference detector was moved from the laser table to inside the screen room
and grounded there. A PVC board and screws were used to isolate the reference
detector platform from the laser table. Also the pre-amplier was placed on a plastic
box above the table. All of the oscilloscopes and detectors that are used for this
diagnostic also have cheaters attached to their cords to avoid creating ground loops.
5.3 Software Filters
Finally, all of the data in this thesis is ltered in MATLAB using a Butterworth lter.
The computer code used to analyze and lter the data is included in Appendix E.
23
Chapter 6
RESULTS OF DENSITY ANALYSIS
Measuring the plasma electron density gives information on fueling dynamics, the
particle connement time, and the plasma performance in relation to the Greenwald
limit [16]. The two methods of gas injection aect the density prole dierently.
Injecting ll gas causes a large initial spike in the density, while pu gas has a larger
eect on the steady-state density. Fluctuations in the density during the second half
of the shot correlate to uctuations in the spheromak current. Comparing electron
density to spheromak current density indicates the best plasma performance occurs
at higher voltage without ll gas.
6.1 Typical Density Prole Divided into Three Regions
A typical density trace can be broken up into three regions: an initial density spike,
a density decay region, and a density plateau (see Fig. 6.1). First the ll gas pressure
is compared to the initial density spike to nd information on the percent ionization.
In the second region, an exponential t to the density decay gives the connement
time of the ll gas. Finally, using the particle ow rate of the pu gas and the
approximately steady-state densityplateau density during the end of the shot a
second connement time is calculated.
24
Figure 6.1: Regions of the HIT-SI density prole
25
6.1.1 Region 1: Initial Density Spike
Increasing the initial ll gas pressure leads to an increase in the initial density spike.
The relation between the peak density and the ll gas pressure gives information
on particle ionization. For a constant pressure in the vacuum vessel, the number of
particles in the connement region and injectors can be found using the ideal gas law:
N =
PV
kT
(6.1)
where k = 1.381 10
23
J/K, T = 298 K, and V = 0.43 m
3
, the volume of the
connement region and injectors. For a ll pressure of 2 mTorr, N = 2.8 10
19
particles. For helium as the ll gas this is 5.6 10
19
electrons.
Figure 6.2 shows the eect of increasing the ll gas pressure with the pu pressure
at 1000 Torr. The linear t in Fig. 6.2 does not pass through zero because the pu
gas also has an eect on the peak density. For this reason it is important to look at
the slope of the linear t at a constant pu pressure. At an injector voltage of 275 V,
an increase in ll pressure of 2 mTorr corresponds to an increase in peak density of
2.810
19
electrons per m
3
. Assuming uniform density, this corresponds to an increase
of 1.1 10
19
electrons in the connement region.
Comparing the number of particles in the connement volume and injectors to the
average electron density, about 20% of the ll electrons are utilized during the initial
density spike.
26
Figure 6.2: Peak density correlation to ll gas: all shots are taken with a pu pressure
of 1000 Torr
6.1.2 Region 2: Exponential Density Decay gives Fill gas Connement Time
To calculate a particle connement time, the number of particles needs to be related
to the particle time rate of change. In the density decay region the number of particles
can be approximated as
N = Ae
t/
(6.2)
and the particle time rate of change as
dN
dt
=
A

e
t/
(6.3)
Relating these two equations gives
=
N
dN/dt
(6.4)
27
which has units of seconds. Therefore, the coecient in the exponential t to the
density decay region gives the particle connement time. This calculation is based on
one chord through the machine and can be made without the assumption of uniform
density throughout the connement region. The steps taken to make this calculation
are outlined below:
1. The density data is ltered so that an appropriate time for the peak density can
be established.
(a) The start point is 0.1 ms after the peak ltered density.
2. The end point was chosen based upon the shot characteristics. For example, for
shots with higher plateau densities the time interval between the peak density
and the plateau density is short. Therefore an end point 0.8 ms after the start
point was selected. For shots with lower plateau densities an end point up to
1.5 ms after the start point was used.
3. The plateau density, the average density between 4.2 and 7.2 ms, is subtracted
from the total density.
(a) This step is important to make the exponential t have its zero level equal
to the plateau density.
4. For the selected range of data points, an exponential t was made to the data
using the MATLAB code listed in Appendix E, n_initial_tau6.m. The expo-
nential t is made to the unltered data.
The resulting values and the time range used can be found in Appendix A. A
typical t of this exponential to the data is shown in Fig. 6.3, with the exponential t
shown plotted out to 4.2 ms. Typical values for varied between 0.5 and 1.5 ms. The
values calculated for were compared to various machine parameters, such as pu
28
pressure, ll pressure, and injector voltage. Little correlation between the machine
parameters and could be found.
Figure 6.3: Shot 114361: Exponential t to the density decay region
29
6.1.3 Region 3: Connement Time based upon Plateau Density and Pu Particle
Injection Rate
A second connement time can be calculated by comparing the plateau density
based upon the assumption of uniform density throughout the connement regionto
the pu particle injection rate. Similar to the previous section, the connement time
is calculated by comparing the number of particles to the particle time rate of change.
=
N
dN/dt
(6.5)
In this case, N is dependent on the plateau density and dN/dt is the pu particle
injection rate. The steps taken to make this calculation are outlined below:
1. The plateau density is calculated as the average density between 4.2 and 7.2 ms.
2. Fig. 6.4 shows that the plateau density increases with increased ll gas. The
slope of the linear t relates the increase in ll gas pressure to the increase
in plateau density. To calculate the connement of the pu gas, the plateau
density dependence on the ll gas is subtracted from the total plateau density.
This means that for an increase of 2 mTorr in ll gas pressure 0.4 10
19
m
3
is
subtracted from the plateau density for this calculation.
3. The adjusted plateau density is divided by the time dependent pu particle ow
rate between 4.2 and 7.2 ms.
4. The average value for over this time range is calculated.
(a) For details on this calculation refer to the MATLAB code,
puff_data_integrate3.m, in Appendix E.
Fig. 6.5 shows the calculated connement times for the shots analyzed in this thesis
with an injector ux of 1 mWb and a vertical eld of 1 A, where the vertical eld is
30
Figure 6.4: Plateau density dependence on ll gas pressure: all shots are taken with
a pu pressure of 1000 Torr
a steady-state eld in the axial direction. Shots taken with an initial pu pressure
of 1000 Torr tend to have the worst performance. There is a lack of data points
at 5000 Torr because the density measurement tends to have more discontinuities
fringe jumpsat higher operating pressures. In general the best connement times
result from running the machine at higher injector voltages. This result is consistent
with other measures of plasma performance, such as spheromak current, which have
the best values at higher injector voltages.
31
Figure 6.5: Particle connement time based upon plateau density
32
6.2 Qualitative Agreement between Plasma Current and Density Fluc-
tuations
Looking at the density and current time histories of several shots, times of higher
spheromak current corresponded to increases in density. This observation is most
readily visible during the plateau density period. Figures 6.6 and 6.7 show two shots
with the same machine parameters: V
inj
= 275 V, Fill = 2 mTorr, and Pu = 3000 Torr.
The density and current are shown on the same plot for each shot from 2 to 7 ms.
Each plot shows increases in density corresponding to increases in current.
Density uctuations show qualitative
agreement to spheromak current:
V
inj
= 275 V, Fill = 2 mTorr, Pu = 3000 Torr
Figure 6.6: Density and current for shot
114476
Figure 6.7: Density and current for shot
114476
6.3 Plasma Performance in Relation to the Greenwald Limit
An empirical relationship in plasma physics, known as the Greenwald limit [16], relates
the plasma current density, j, to the electron density, n. Plasmas operating below
j/n = 10
14
Am tend to be radiation dominated, thus it is important to pursue a
parameter space with low density in relation to plasma current. By increasing j/n
33
the plasma performance would improve, becoming less radiation-dominated.
The current density is calculated using the following equation
j =
I
toroidal
A
(6.6)
where I
toroidal
is the frequency compensated spheromak current calculated using the
20 external ux loops and A = 0.2 m
2
is the cross-sectional area of HIT-SI. Assuming
uniform electron density, the ratio of current density to electron density is calculated
as
j
n
=
I
toroidal
nA
(6.7)
where n is the line-averaged density.
Figure 6.8 shows the maximum value of j/n for each shot. Typical plasmas tended
to achieve a peak j/n on the order of 1 to 210
15
Am. The four shots in the upper-
right portion of Fig. 6.8, with values of j/n approaching 510
15
Am, were run with
no ll gas at V
inj
= 350 V. To continue to increase j/n, the parameter space in this
regime needs to be further explored.
34
Figure 6.8: j/n is Greatest for High Voltage Shots without Fill Gas
35
Chapter 7
CONCLUSION
A study of the pu gas injection system was made. Knowledge of the particle
ow rate aided in the optimization of the feed and control throttle valves to achieve
symmetry in both injectors. This will also allow the injectors to be run without a
decrease in injector current from a lack of pu gas due to the N/O valve closing before
the end of the shot.
In order to reduce the noise pickup on the FIR signal, a new scene detector was
constructed and ground loops near the reference detector were removed. This im-
proved the signal to noise ratio of the scene and reference signals.
Analysis of the density proles provided two means of calculating the particle
connement time. An exponential t to the density decay region showed connement
times that varied between roughly 0.5 and 1.5 ms. The second connement time
was found by comparing the plateau density to the pu gas injection rate at that
time. Values for this connement time averaged 1.5 ms. Comparison of the density
prole to the toroidal plasma current showed that times of high current corresponded
to increases in density. Finally, the ratio of current density to electron density was
calculated for each shot. While all of our shots were below the Greenwald limit, shots
with no ll gas and high voltage approached values of 0.5 10
14
Am.
36
Chapter 8
FUTURE WORK
8.1 Gas Pressure Measurement
Pressure increases from the pu gas system need to be measured at the midplane of
the connement region. This will allow eects on the pu gas injection between the
pressure transducer and connement region to be measured. Possible asymmetries in
injection rates between the injectors could also be found.
8.2 FIR Signal
To prevent losses in the FIR signal along transmission lines a line driver should be
installed. In order to accommodate the line driver the scene detector enclosure needs
to be redesigned.
8.3 Machine Operation
The control valves for the pu gas system need to be optimized for the fueling of the
injectors. To increase the ratio of current density to electron density the machine
should be operated without ll gas at higher voltages.
37
BIBLIOGRAPHY
[1] U. Shumlak. AA558: Plasma theory, Spring 2008.
[2] ZaP: Z-pinch attributes. http://www.aa.washington.edu/research/ZaP/
attributes.html, July 2009.
[3] R. Pitts, R. Buttery, and S. Pinches. Fusion: the way ahead. Physics World,
March 2006. http://physicsworld.com/cws/article/print/24295.
[4] B.J.D. Tubbing et al. AC plasma current operation in the JET tokamak. Nuclear
Fusion, 32(6):967972, 1992.
[5] T.R. Jarboe. Review of spheromak research. Plasma Phys. Control. Fusion,
36(6):945990, 1994.
[6] How to make a spheromak. http://ve4xm.caltech.edu/Bellan_plasma_page/
howto.htm, February 2000.
[7] W.C. Turner, G.C. Goldenbaum, E.H.A. Granneman, J.H. Hammer, C.W. Hart-
man, D.S. Prono, and J. Taska. Investigations of the magnetic structure and the
decay of a plasma-gun-generated compact torus. Physics of Fluids, 26(7):1965
1986, 1983.
[8] T.R. Jarboe. Steady inductive helicity injection and its application to a high-beta
spheromak. Fusion Technology, 36(1):8591, 1999.
[9] P.E. Sieck, W.T. Hamp, V.A. Izzo, T.R. Jarboe, B.A. Nelson, R.G. ONeill, A.J.
Redd, and R.J. Smith. Initial studies of steady inductive helicity injection on
the HIT-SI experiment. Plasma Science, IEEE Transactions on, 33(2):723728,
2005.
[10] U. Shumlak and T.R. Jarboe. Stable high beta spheromak equilibria using con-
cave ux conservers. Physics of Plasmas, 7(7):29592963, 2000.
[11] J.B. Taylor. Relaxation and magnetic reconnection in plasmas. Rev. Mod. Phys.,
58(3):741763, 1986.
38
[12] P.E. Sieck. The helicity injected torus with steady inductive helicity injection.
Masters thesis, University of Washington, 2001.
[13] I.H. Hutchinson. Principles of Plasma Diagnostics. Cambridge University Press,
Cambridge, 2nd edition, 2002.
[14] P.D. Jewell, R.J. Smith, and T.R. Jarboe. Martin-Puplett multichannel far in-
frared heterodyne interferometer on the Helicity Injected Torus II. Rev. Sci.
Instrum., 74(1):8087, 2003.
[15] A.J. Redd, T.R. Jarboe, R.Z. AboulHosn, C. Akcay, W.T. Hamp, G.J. Marklin,
B.A. Nelson, R.G. ONeill, P.E. Sieck, R.J. Smith, B.T. Stewart, and J.S. Wrobel.
Internal elds in helicity injected torus with steady inductive helicity injection
(HIT-SI) discharges. J. Fusion Energy, 27:100103, 2008.
[16] M. Greenwald, J. Terry, S. Wolfe, S. Ejima, M. Bell, S. Kaye, and G.H. Neilson.
A new look at density limits in tokamaks. Nucl. Fusion, 28:21992207, 1988.
[17] R.G. ONeill. An Experimental Study of Helicity Injection Current Drive in the
HIT-SI Spheromak. PhD thesis, University of Washington, 2007.
39
Appendix A
TABLES OF HIT-SI DENSITY DATA
Appendix A lists the shots presented in this thesis. The machine parameters and
calculated values are presented in the tables that follow. All of the shots are run at

inj
= 1.0 mWb and a vertical eld of 1.0 A.
[1] indicates that decay tau was calculated with the end of tting period 0.8 ms
after the density peak.
[2] indicates that decay tau was calculated with the end of tting period 1.5 ms
after the density peak.
[3] indicates that a decay tau couldnt be calculated because of the plasma pa-
rameters.
[4] indicates that the shot contained a VCE fault.
Table A.1: Calculated Values from Density Data, HIT-SI Shots 114073 - 114075
Shot Fill
(mT)
Pu
(T)
V
inj
(V)
Peak
I
tor
(kA)
Peak j/n
(10
15
Am)
Plateau n
e
(10
19
m
3
)
Decay
(ms
1
)
End
(ms
1
)
114073 2 3000 275 11.9 1.7 2.6 0.51 1.7
114074 2 2000 275 7.0 1.3 1.4 0.65 1.1
114075 2 2000 275 3.8 1.2 1.0 0.70 0.6
40
Table A.2: Calculated Values from Density Data, HIT-SI Shots 114077 - 114460
Shot Fill
(mT)
Pu
(T)
V
inj
(V)
Peak
I
tor
(kA)
Peak j/n
(10
15
Am)
Plateau n
e
(10
19
m
3
)
Decay
(ms
1
)
End
(ms
1
)
114077 2 2000 275 10.0 1.6 1.5 0.86 1.2
114093 4 2000 275 8.0 1.3 2.7 1.3 2.1
114094 4 1000 275 4.9 0.6 1.2 1.1 0.9
114096 4 2000 300 8.0 1.1 2.3 1.0 1.6
114104 2 1000 350 11.0 1.6 0.7 1.0 0.5
114106 0 2000 350 20.1 3.6 0.9 [3] 1.0
114107 0 3000 350 18.8 4.9 2.8 [3] 2.1
114323 2 5000 275 11.2 1.2 4.3 0.64 1.8
114356 0 3000 350 20.2 3.8 3.4 [3] 2.5
114359 0 3000 350 20.2 4.6 3.0 [3] 2.2
114360 2 3000 325 18.1 1.3 3.5 1.5 2.3
114361 2 3000 325 15.5 1.7 3.2 0.99 [1] 2.1
114362 2 2000 325 14.1 2.3 2.0 1.1 1.7
114363 2 2000 325 9.3 1.5 1.9 0.98 1.7
114364 2 2000 325 16.3 2.6 2.1 0.99 1.9
114373 2 2000 275 8.7 1.8 2.0 1.6 [1] 1.8
114374 2 2000 275 5.6 1.4 2.0 0.79 1.7
114457 2 3000 325 15.0 1.2 3.3 1.4 [2] 2.1
114459 2 2000 325 16.6 2.2 2.0 [3] 1.8
114460 2 2000 325 12.3 1.6 2.2 0.46 2.0
41
Table A.3: Calculated Values from Density Data, HIT-SI Shots 114461 - 114652
Shot Fill
(mT)
Pu
(T)
V
inj
(V)
Peak
I
tor
(kA)
Peak j/n
(10
15
Am)
Plateau n
e
(10
19
m
3
)
Decay
(ms
1
)
End
(ms
1
)
114461 2 2000 325 13.7 2.0 1.8 0.63 1.6
114465 2 3000 300 13.4 1.2 4.0 [3] 2.7
114480 2 3000 300 13.7 1.6 3.3 0.75 2.2
114481 2 2000 300 8.2 1.8 1.9 0.93 1.6
114482 2 2000 300 11.2 1.2 2.3 0.76 2.1
114483 2 2000 300 9.0 1.5 1.9 0.91 1.6
114563 2 5000 350 7.0 1.0 0.0 [4] [4]
114625 2 2000 325 13.9 2.4 2.1 1.1 1.8
114626 2 2000 325 14.6 2.1 2.5 [3] 2.4
114627 2 2000 325 12.7 1.7 2.2 2.0 2.0
114628 2 2000 325 12.5 1.8 2.1 1.1 1.9
114644 2 1000 300 6.2 0.7 0.7 0.50 0.5
114645 2 1000 300 7.0 0.9 0.7 [3] 0.6
114646 2 1000 275 2.4 0.7 0.7 1.0 0.6
114647 2 1000 275 2.4 0.4 0.8 0.93 0.8
114648 4 1000 275 5.7 0.6 1.0 [3] 0.5
114649 4 1000 275 6.2 0.7 1.0 1.1 0.4
114650 4 1000 275 6.6 0.8 1.1 1.3 0.7
114651 4 1000 300 6.9 0.8 1.2 1.2 [2] 0.8
114652 4 1000 300 6.7 1.0 1.0 1.5 [2] 0.4
42
Table A.4: Calculated Values from Density Data, HIT-SI Shots 114659 - 114699
Shot Fill
(mT)
Pu
(T)
V
inj
(V)
Peak
I
tor
(kA)
Peak j/n
(10
15
Am)
Plateau n
e
(10
19
m
3
)
Decay
(ms
1
)
End
(ms
1
)
114659 4 1000 275 6.0 0.8 0.9 1.4 0.2
114660 4 1000 275 5.9 0.7 1.1 1.2 0.6
114661 6 1000 275 5.1 0.6 1.4 2.4 [2] 0.3
114662 6 1000 275 6.4 0.8 1.5 1.3 0.6
114663 8 1000 275 7.5 0.7 1.6 1.3 0.0
114664 8 1000 275 5.5 0.8 1.9 1.2 [2] 0.6
114669 4 1000 325 9.6 1.2 1.5 1.2 1.5
114671 6 1000 325 8.0 0.8 1.5 1.2 0.7
114673 2 1000 325 8.8 0.9 0.7 1.2 0.6
114674 2 1000 325 7.3 1.1 0.6 0.86 0.4
114675 2 2000 350 15.5 1.7 2.2 [3] 2.0
114676 2 2000 350 16.5 2.1 1.9 1.0 1.6
114687 2 3000 275 12.2 1.3 3.2 0.99 2.1
114689 2 3000 300 13.0 1.3 3.2 0.56 2.1
114690 2 3000 325 14.7 1.5 3.3 1.1 2.1
114691 2 3000 325 15.7 1.6 3.3 0.83 2.1
114692 2 3000 350 14.3 1.3 3.0 [3] 1.9
114696 4 2000 325 9.6 1.2 2.6 [3] 2.0
114698 2 2000 350 18.1 2.2 2.6 [3] 2.4
114699 2 2000 350 14.5 1.5 2.5 0.68 2.3
43
Appendix B
DESCRIPTION OF THE TWO CAVITY FIR LASER
SYSTEM
Note: this description of the system is taken from Appendix D in R.G.
ONeals dissertation [17] with changes applicable to the current system in
bold.
The two cavity FIR laser system is made primarily of equipment donated from
Lawrence Livermore National Laboratory, and was renovated for use on the HIT-SI
experiment. This appendix gives a general overview of the system and a standard
operating procedure for running the system.
B.1 General Overview of the Two Cavity FIR Laser System
The FIR system consists of a 100 Watt CW rated carbon dioxide pump laser, and
two diuoromethane FIR lasers. The CO
2
pump laser is tuned to the 9R32 transition
( 9.2 m) with a diraction grating. The power output measured by calorimeter on
this line is approximately 55 - 65 Watts continuous in practice. The beam is focused
using a 2 m radius concave spherical mirror. Before the beam converges, it is split
by a ZnSe partial reector. One beam is directed into the master FIR cavity, and
the other into the slave cavity. The optical path is laid out such that the CO
2
beam
comes to a waist as it enters the input coupler of the FIR cavities. The FIR input
couplers are 2 diameter mirrors with a 3 mm hole in them for the beam to enter. To
maintain vacuum, the beam is passed through a ZnSe Brewster window, (uncoated
ZnSe glass tilted at its Brewster angle). The CO
2
beam expands from its waist at
the entrance hole to ll the FIR cavity. The FIR output couplers are gold-coated
44
silicon wafers and a quartz window for vacuum. The output couplers are mounted
on PZT stacks so that the cavity length can be precisely adjusted. The FIR cavities
are lled with 55mTorr of diuoromethane gas, and lase at 184.3 m. By tuning
the PZT stacks, a frequency dierence of 3 - 4 MHz can be maintained between
the two cavities. The FIR cavities output 30 100mWatts of FIR light each.
The master beam polarization is rotated by a quartz half-wave plate, so that it is
perpendicular to the slave beam. The beams are combined and made collinear at a
free standing polarizing wire grid. The beams are coupled to a quartz tube which acts
as a waveguide and guided towards the Martin-Puplett interferometer. The beams
are detected with quasi-optical corner cube detectors which have a point contacted
whisker antenna connected to a forward biased low capacitance Schottky-diode. The
intermediate frequency is amplied and digitized.
B.2 Standard Operating Procedures
This subsection describes how to turn the system on, set it up for interferometry, and
shut it down.
B.2.1 Turning on the Data Acquisition
1. Ensure that the reference and scene Schottky detectors are in SHORT or OFF
position.
2. Never jolt/jostle/elctrostatically shock/smack. This could kill the diode. They
are fragile, and very sensitive to electrostatic discharge.
3. Never change the state of bias supplies or ampliers the detectors are connected
to unless the detector is in the OFF or SHORT position.
4. Turn on the CAMAC crate in the blue rack in the screen room.
45
5. Turn on the scene detector preamplier power supply. It is a small blue box on
a shelf in the northeast corner of the screen room.
6. Turn on the reference detector preamplier power supply. It is an aluminum
paneled supply to the left of the scene detector preamplier power sup-
ply.
7. Turn the reference Bias supply to internal (the middle state of the 3 state
switch). It is located near the reference detector.
8. Turn the oscilloscope on.
9. Turn the reference detector to ON. You should see the reference signal on the
oscilloscope go from clean to noisy.
10. Turn the scene detector bias supply to internal. It is located near the scene
detector preamplier power supply.
11. Turn the scene detector ON, and then close up the aluminum electrostatic shield
and copper Faraday cage.
12. Check that the scene signal is showing noise on the oscilloscope.
B.2.2 FIR Lasers Start Up
Wear CO
2
Safety Goggles When Working Around the Laser!
1. Turn on the Neslab water chiller. It is best to turn this on 30 minutes before
starting the rest of the system so the water cools.
2. Turn on the three PZT bias supplies in the orange rack.
46
3. Place one of the kiln bricks in front of the CO
2
laser, about 1 to 2 feet away from
the output coupler. This will block the beam and allow for the beam strength
and mode to be visualized as a glowing yellow hot spot on the brick.
4. Close the sliding acrylic panels to enclose the business end of the CO
2
laser.
5. Start the dry air ow from the yellow air bottle next to the screen room. Verify
that there is pressure in the tank.
6. Open the green Nupro valve under the south-west corner of the laser table wide
open.
7. Adjust the black ow meter valve next to the Nupro until the CO
2
baratron
gauge reads about 5.0 Torr.
8. Flip the blue Spellman HV supply (at the bottom of the orange rack) to on.
9. Position yourself next to the orange rack so that you can see the cathode (output
end electrode) on the CO
2
laser.
10. Push the red HV button on the Spellman, and immediately look at the cathode:
If the discharge glows up around the sides of the cathode, push the black
RESET button immediately. Wait 10 seconds, and try again.
If the discharge goes out the pumpout tube, push the black RESET button
immediately. Wait 10 seconds, and try again.
If the discharge does anything else abnormal, push the black RESET but-
ton immediately. Figure out what went wrong, and x it.
The discharge SHOULD go from JUST the bottom tip of the cathode,
through the laser tube to the anode. It should be white or faint pink. It
47
often takes several tries to achieve this. When it happens, dont push the
RESET button!
11. Open the black valve to bring the CO
2
gas pressure to 12 Torr on the Baratron
gauge. This should turn the discharge color from white to a deep pink/purple.
It will also raise the supply voltage.
12. Close the FIR roughing pump valve (green handled valve above pump trap).
13. Crack the black diuoromethane valve next to the diuoromethane regula-
tor, while watching the FIR convectron gauge. Bring the convectron gauge
to 55mTorr and then close the valve. The pressure usually drops again
when you close the valve, so iterate by slightly overlling and closing the valve
until the gauge reads 55mTorr with the valve closed.
14. After the CO
2
discharge has been going for several minutes, use the Watt
meter located above the laser table enclosure to tune the laser to
achieve maximum power output ( 60W). Use the CO
2
piezo bias as
needed. Avoid making large changes, especially on the grating end wavelength
adjustment. Careful not to burn your arm in the beam as you reach for the
output coupler adjustments!
15. When the laser is tuned, remove the kiln brick from the beam path, and close
the acrylic shield again. You should see some signal on the oscilloscope.
16. While wearing goggles, and viewing through the acrylic shield, verify that the
beam is not contacting the FIR input couplers, making them glow anywhere.
17. Tune the lasers to bring the scene and reference detectors to as high amplitude
as possible, with a clean, sinusoidal, 3 4MHz signal on the oscilloscope.
48
250 mVolts peak to peak on the scene, and 800 mVolts on the reference are
typical. Its hard to describe a concise procedure for this, but here are some
tricks.
First, tune the CO
2
laser diraction grating to maximize/clean the signal.
Nudge/Prod the FIR output couplers with your hand to see if moving them
improves anything. If it does, make the appropriate adjustments on the
knobs. Dont touch the PZT stacks, you can get a jolt.
Sometimes, a wide, sweeping scan of the FIR output coupler knobs is
required to nd a good mode. If you do this, rst be sure the CO
2
is at
good power, make note of where the FIR knob is before moving it, and
move only one FIR knob at a time.
If the signal is strong and sinusoidal, but not at a good frequency, adjust
the PZT bias on either the slave or master to change the frequency.
If the signal has sidebands, or is not sinusoidal, check which FIR cavity is
making the bad signal by sticking your hand in one beam or the other at
the FIR output coupler and seeing which one interrupts the undesirable
signal. Tune that one. Dont stick your hand into the beam at the FIR
input coupler.
If there is no visible signal, make only minor adjustments, nudging and
prodding the output couplers, and CO
2
diraction grating. If that doesnt
work, there is probably something wrong, like a detector/amplier is o,
there is no diuoromethane gas in the cavity, the beam is obstructed,
the pump laser is on the wrong line, or something. Dont make large
adjustments to the FIR knobs when there is no signal. Instead, look around
for something that is obviously wrong.
If you suspect the pump laser is on the wrong line, put the kiln brick in the
49
pump beam, tune the CO
2
until the beam is strong, and remove the brick
again while watching the FIR convectron pressure. If it is the right line,
the pump beam will raise the FIR pressure by 5 mTorr within about
two seconds of removing the brick. If it is the wrong line, the pressure will
not change, or will change by 1 to 2 mTorr slowly, over ve to ten seconds.
If it is the wrong line, put the brick in and adjust the wavelength knob
in one direction until you nd another series of powerful lines. ( 1 2
full turns). Try the pressure test again. If you really get lost, there is a
spectrometer that can be set up. The laser doesnt normally go o of the
9R32 line unless youve been adjusting the wavelength knob.
A good intermediate frequency will appear as a clean sinusoidal signal on
both the scene and reference detectors. If you obstruct either the slave or
the master beam at the FIR output couplers, the signal will completely
disappear on both detectors. If the signal does not disappear when an FIR
laser is obstructed, the signal is not a proper intermediate frequency, and
there is a problem in the unobstructed cavity.
B.2.3 FIR System Shut Down
1. Switch the scene and reference detectors to OFF or SHORT position.
2. Switch o the scene and reference detector bias supplies.
3. Turn o the amplier power supplies.
4. Push the black RESET button on the Spellman HV supply.
5. Wait a few seconds, and then turn o the Spellman HV supply.
6. Open the FIR cavity pumpout valve, and let the FIR lasers pump down.
50
7. Turn the green Nupro valve under the south-west corner of the table to closed.
8. Close the yellow dry air bottle.
9. Turn the Neslab chiller o.
10. Turn o the oscilloscope.
11. Turn o the three bias supplies in the orange rack.
12. Check with the operator before turning the CAMAC crate o.
B.3 Recent Changes to the FIR System
The layout of the cooling system was changed to allow higher water pressure to ow.
Currently the cooling system has four parallel paths that originate from the Neslab
chiller: one for the CO
2
laser chamber, one for each of the FIR laser chambers, and
one for the laser input and output couplers.
The focusing lens for the scene detector was changed to match the diameter of
the waveguides. A lens made out of HRFZ-SI was purchased in order to achieve a
focal length of one inch with 1.5 inch diameter lens. The lens was purchased from
TYDEX, J.S.Co. Information on this lens can be found at www.tydex.ru
51
Appendix C
PUFF GAS MEASUREMENTS
C.1 Calculating the Plenum Volume
1. Open the feed gas throttle valve to ll the plenum to the main gas supply
pressure.
2. Close the feed gas throttle valve.
3. Open the N/C valve and measure the pressure increase in the vacuum region.
4. Record the pressure in the connement region.
5. Repeat steps 1 to 4 until the plenum has been emptied 10 times into the con-
nement region, recording the pressure of the connement region after each
step.
6. Repeat these steps at a dierent main gas supply pressure to ensure that there
arent any nonlinearities associated with the main gas supply pressure.
7. Knowing the volume of the connement region, the plenum volume can be
calculated as
V
plenum
= V
machine
P
machine
P
plenum
(C.1)
where V
machine
= 0.57 m
3
, the volume of the connement region, injectors, pump-
ing T, and barrel.
8. These steps need to be repeated for each injector.
52
9. For the X-side: V
plenum
= 9.7 10
7
m
3
For the Y-side: V
plenum
= 8.9 10
7
m
3
C.2 The Initial Number of Particles in the Plenum
The number of particles in the plenum can be found using the ideal gas law:
N =
PV
plenum
kT
(C.2)
where k = 1.381 10
23
J/K and T = 298 K. For an initial pressure of 5000 Torr:
N = 1.6 10
20
particles for the X-side
N = 1.4 10
20
particles for the Y-side
For helium there are two electrons per particle.
C.3 Pu Plenum Pressure as a Function of Time
1. Hook up the power supply (PCB Piezotronics Model 482A06) to the pressure
transducer (PCB 61 A01)
2. Connect to a digitizer. The data in this thesis was taken using digitizer
\HIT_612_ZZ2:INPUT1.
3. For X-side measurements point the node \PRESS_XINJ:RAW to the correct digi-
tizer input.
4. For Y-side measurements point the node \PRESS_YINJ:RAW to the correct digi-
tizer input.
5. The measurements taken in this thesis are found in shots 114778 to 114805.
53
C.4 Operational Notes
Since the ow rate measurements described above were taken, the setting of the
control gas throttle valve was changed so that the N/O valve closes 20 ms after the
beginning of the shot. The pressure transducer measurements for these new settings
are found in shots 115101 to 115105. The feed gas throttle valve has been changed
to ensure that the measured gas pressure at the pressure transducer remains nearly
constant through the duration of the shot. It should also be noted that all of the data
reported in this thesis uses Helium as the operating gas.
54
Appendix D
ELECTRICAL NOISE TROUBLESHOOTING THE FIR
SIGNAL DETECTION SYSTEM
D.1 Scene Signal
The following are some helpful tips if electrical noise pick up becomes a problem with
the scene signal.
1. If anything is moved inside of the scene detector enclosure it is important to
keep the components electrically isolated from each other and from the walls of
the enclosure.
(a) The pre-amplier and amplier should be positioned so that they are sep-
arated by Kapton tape.
(b) Check that none of the connections make a loop to the wall or to the
Schottky diode.
2. The scene enclosure also needs to be isolated from the Faraday cage.
(a) The scene detector should rest on nonconductive material.
(b) Also, the shielding surrounding the output from the scene detector needs
to be isolated from the hole in the back of the Faraday cage.
D.2 Reference Signal
The following are some helpful tips if electrical noise pick up becomes a problem with
the reference signal.
55
1. The most common source of noise in the reference signal is from ground loops.
(a) If there is new noise on the signal the most likely cause is that an oscillo-
scope was hooked up without a cheater.
(b) If that doesnt eliminate the noise check that the other electrical equipment
on the laser table are grounded properly.
(c) Also check that the pre-amplier isnt touching the laser table.
56
Appendix E
MATLAB CODE
E.1 Density Calculation
There are several versions of the density calculation code. Included in the folder is a
readme le that explains the dierence between the dierent codes. Most notably, it
is important to calculate the frequency, for ltering purposes, using the stronger of
the reference and scene signals. This program is adapted from the program written
by Gri ONeal [17]. This le is located on the HITSI server at
U:\bvictor\Matlab\den_calc\density_calc_sig7.m
cl ear al l ; cl ose al l ;
% l oad t he i nf ormat i on from t he t r e e
load s : \ Matlab\ de n c al c \ f i r i n i . dat ;
[ a , s t at us ] = mdsopen( l andau . hi t : : h i t s i , 0 ) ;
c ur r e nt s hot = mdsvalue ( $shot ) ;
disp ( [ cur r ent shot : i nt2str ( c ur r e nt s hot ) ] ) ;
shot = f i r i n i ( 1 ) ;
mdscl ose ;
s hot i n = input ( [ What shot ? Def aul t : [ i nt2str ( shot ) ] ] ) ;
i f ( s hot i n ) ;
shot = s hot i n ;
end;
[ a , s t at us ] = mdsopen( l andau . hi t : : h i t s i , shot ) ;
Nchords = 1; %f i r i n i ( 2) ;
57
chord num1 = 7; %f i r i n i ( 3) ;
% chord num1 i n = i nput ( [ What chord? Def aul t i s
% [ i nt 2 s t r ( chord num1 ) ] ] ) ;
% i f ( chord num1 i n )
% chord num1 = chord num1 i n ;
% end ;
disp ( [ Anal yzi ng Shot : i nt2str ( shot ) ] ) ;
%%
% s e t s r e f t o t he val ue of \ f i r r e f
r e f = mdsvalue ( r e f = \ f i r r e f ) ;
% s e t s s i g t o t he val ue of \ f i r d e t
s i g = mdsvalue ( s i g = \ f i r d e t ) ;
% t t = mdsval ue ( di m of (\ f i r r e f ) ) ;
% use t h i s f or t he ti me c a l c ul a t i o n t o ensure cons t ant dt
tmin = mdsvalue ( mi nval ( di m of ( r e f ) ) ) ;
tmax = mdsvalue ( maxval ( di m of ( r e f ) ) ) ;
dt = mdsvalue ( s ampl i ngi nt e r val ( r e f ) ) ;
t t = tmin : dt : tmax ;
t t = tt ;
%%
% machine paramet ers
% r adi us of t he pl asma
Ref f = 0 . 5 0 ; % [m]
% i mpact paramet ers of t he var i ous chords
% add l i nk t o f i l e of pi c t ur e of t he chords
% channel 1 i mpact paramet ers [m] ( f or chords 1 10)
i mpact l ower = [ . 1 6 5 5 , . 1655 , . 1655 , . 2137 , . 261 , . 3067 , . 3507 , . . .
. 3928 , . 4326 , . 4 7 ] ;
% % channel 2 i mpact paramet ers [m] ( f or chords 1 10)
% i mpact upper = [ . 202 , . 202 , . 202 , . 25 , . 297 , . 342 , . 389 , . . .
% . 4268 , . 4659 , . 5 0 1 4 ] ;
% % t he i mpact parameter f or t he current s hot
i mpact1 = i mpact l ower ( chord num1 ) ; %. 3507;
58
% t he chord l e ng t h f or t he current s hot
chor d l engt h1 = 2 sqrt ( Ref f 2 i mpact1 2) ;
mdscl ose ;
%%
% al l ows t he p l o t s t o be t urned o f f
ShowPlots = 0;
Show = input ( Enter y to s ee a l l of the pl ot s . , s ) ;
i f ( strcmp( Show, y ) )
ShowPlots = 1;
end
% al l ows an aut ocor r ect i on al gor i t hm t o be used
% 1 = on , 0 = o f f
AutoCorrect = 0;
%%
% crop t he number of dat a poi nt s , e l i mi nat i ng poi nt s b e f or e and a f t e r s hot
% o r i g i na l s t a r t ti me = 0.0026 s , end ti me = 0. 018 s
t s = 0. 0005; % new s t a r t ti me
t e= 0. 0124; % new end ti me
[ aa , I s ] = min( ( tt t s ) . 2 ) ; % f i nd t he poi nt near es t t he s t a r t ti me
[ bb , I e ] = min( ( tt t e ) . 2 ) ; % f i nd t he poi nt near es t t he end ti me
t = t t ( I s : I e ) ; % crop t he ti me
t m = 1000 t ; % g i v e s t he ti me i n mi l l i s e c onds
poi nt s = length( t ) ; % l e ng t h of t he vect or
c r e f = r e f ( I s : I e ) ; % crop r e f s i g na l
c s i g = s i g ( I s : I e ) ; % crop scene s i g na l
%%
% v al ue s used f or f r e q c a l c ul a t i o ns
Sampl e rate = round(1/ dt ) ; % ave number of pt s per sec
Fnyqui st = Sampl e rate /2; % Nyqui st f requency
disp ( [ Sampl e rate = i nt2str ( Sampl e rate /1 e3 ) . . .
KS/ s ec ; Time Step = i nt2str ( dt 1 e6 ) mi cr os ec ] ) ;
%%
% t he next two s e c t i ons c a l c u l a t e t he f requency of t he r e f and scene
% s i g na l s f or f i l t e r i n g purposes . I t i s b e s t t o c a l c ul a t e t he f requency
% from whi chever s i g na l has a l ar g e r magnitude
%%
% c a l c u l a t e t he f requency of t he r e f s i g na l
59
r e f po i nt s = round( . 0002/ dt ) ;
% removing a 0 t h order dc o f f s e t
ba s e r e f = c r e f ( 1 : r e f po i nt s ) sum( c r e f ( 1 : r e f po i nt s ) ) . . .
/length( c r e f ( 1 : r e f po i nt s ) ) ;
% mul t i pl y s uc c e s s i v e poi nt s
c r o s s po i nt s = ba s e r e f ( 1 : length( ba s e r e f ) 1). . . .
ba s e r e f ( 2 : length( ba s e r e f ) ) ;
% cr eat e vect or wi t h 1 s at c r os s i ng s and 0 el s ewher e
c r o s s po i nt s = ( c r o s s po i nt s . / ( abs ( c r o s s po i nt s ) ) 1)/( 2);
% t o t a l zero c r os s i ng s
z c t r e f = sum( c r o s s po i nt s ) ;
% f requency
r e f f r e q = ( z c t r e f /2) /( length( ba s e r e f ) dt ) ;
disp ( [ Ref er ence Frequency = i nt2str ( r e f f r e q /1000) kHz ] ) ;
%%
% c a l c u l a t e t he f requency of t he scene s i g na l
% l ook i ng at f i r s t . 2 ms t o avoi d i nj e c t o r f r e q pi ck up
% r ef e r enc e de t e c t or
s i g po i nt s = round( . 0002/ dt ) ;
% removing a 0 t h order dc o f f s e t
% from begi nni ng poi nt s
ba s e s i g = c s i g ( 1 : s i g po i nt s ) sum( c s i g ( 1 : s i g po i nt s ) ) / . . .
length( c r e f ( 1 : s i g po i nt s ) ) ;
% mul t i pl y s uc c e s s i v e poi nt s
c r o s s p o i n t s s i g = ba s e s i g ( 1 : length( ba s e s i g ) 1). . . .
ba s e s i g ( 2 : length( ba s e s i g ) ) ;
% cr eat e vect or wi t h 1 s at c r os s i ng s and 0 el s ewher e
c r o s s p o i n t s s i g = ( c r o s s p o i n t s s i g . / ( abs ( c r o s s p o i n t s s i g ) ) 1)/( 2);
% t o t a l zero c r os s i ng s
z c t s i g = sum( c r o s s p o i n t s s i g ) ;
% f requency
s i g f r e q = ( z c t s i g /2) /( s i g po i nt s dt ) ;
disp ( [ Scene Frequency = i nt2str ( s i g f r e q /1000) kHz ] ) ;
% s e t t i ng t he r e f f r e q t o t he s i g f r e q because t he s i g f r e q i s more
% accurat e f or f i l t e r i n g purposes
r e f f r e q = s i g f r e q ;
%%
%%
% f i l t e r t he s i g na l s
60
%%
% r ef e r e nc e f i l t e r
% h a l f bandwi dt h (Hz)
hbwref = min( 180000 , . 2 r e f f r e q ) ;
% order of t he f i l t e r /2
n r e f = 1;
% normal i z i ng w. r . t . t he Nyqui st f r e q
l o w f r e q r e f = ( r e f f r e q hbwref )/ Fnyqui st ;
h i g h f r e q r e f = ( r e f f r e q + hbwref )/ Fnyqui st ;
Wn ref = [ l o w f r e q r e f , h i g h f r e q r e f ] ;
% f i l t e r i n g wi t h t he b ut t e r f i l t e r
[ b r e f , a r e f ] = but t er ( n r e f , Wn ref ) ;
% usi ng t hes e v a r i a b l e s t o f i l t e r t he cropped r e f s i g na l
f i l r e f = f i l t f i l t ( b r e f , a r e f , c r e f ) ;
% p l o t t he r e f s i g na l ( raw and f i l t e r e d )
i f ( ShowPlots ) ;
fi gure ( 1 ) ;
c l f ;
grid ;
t i t l e ( [ Shot i nt2str ( shot ) : Ref er ence Si gnal ] , FontSi ze , 14) ;
hold on ;
plot ( t m , c r e f , r , t m , f i l r e f , b ) ;
h1 = legend( Raw , Fi l t e r e d ) ;
set ( h1 , I nt e r pr e t e r , none ) ;
xlabel ( Time [ ms ] , FontSi ze , 12 , FontWeight , bol d ) ;
ylabel ( Si gnal Strength [ V] , FontSi ze , 12 , FontWeight , bol d ) ;
fi gure ( gcf ) ;
end;
%%
% scene f i l t e r
% h a l f bandwi dt h (Hz)
hbwdet = min( . 7 e6 , s i g f r e q . 3 e6 ) ;
%order of t he f i l t e r /2
n s i g = 3;
% normal i z i ng w. r . t . t he Nyqui st f r e q
l o w f r e q s i g = ( s i g f r e q hbwdet )/ Fnyqui st ;
h i g h f r e q s i g = ( s i g f r e q + hbwdet )/ Fnyqui st ;
Wn sig = [ l o w f r e q s i g , h i g h f r e q s i g ] ;
% f i l t e r i n g wi t h t he b ut t e r f i l t e r
[ b s i g , a s i g ] = but t er ( n s i g , Wn sig ) ;
% usi ng t hes e v a r i a b l e s t o f i l t e r t he cropped scene s i g na l
f i l s i g = f i l t f i l t ( b s i g , a s i g , c s i g ) ;
% p l o t t he scene s i g na l ( raw and f i l t e r e d )
i f ( ShowPlots ) ;
fi gure ( 2 ) ;
61
c l f ;
grid ;
t i t l e ( [ Shot i nt2str ( shot ) : Scene Si gnal ] , FontSi ze , 14) ;
hold on ;
plot ( t m , c s i g , r , t m , f i l s i g , b ) ;
h2 = legend( Raw , Fi l t e r e d ) ;
set ( h2 , I nt e r pr e t e r , none ) ;
xlabel ( Time [ ms ] , FontSi ze , 12 , FontWeight , bol d ) ;
ylabel ( Si gnal Strength [ V] , FontSi ze , 12 , FontWeight , bol d ) ;
fi gure ( gcf ) ;
end;
%%
%%
% c a l c u l a t e and p l o t t he f f t s
%%
% r ef e r enc e s i g na l
% u nf i l t e r e d r e f s i g na l
r e f f f t dum = abs ( f f t ( c r e f ) ) ;
N r e f f f t dum = length( r e f f f t dum ) ;
r e f f f t = r e f f f t dum ( 1 : round( N r e f f f t dum / 2 ) ) ;
N r e f f f t = length( r e f f f t ) ;
p l o t r e f f f t = 10log10( r e f f f t /max( r e f f f t ) ) ;
% f i l t e r e d r e f s i g na l
f i l r e f f f t d u m = abs ( f f t ( f i l r e f ) ) ;
N f i l r e f f f t dum = length( f i l r e f f f t d u m ) ;
f i l r e f f f t = f i l r e f f f t d u m ( 1 : round( N f i l r e f f f t dum / 2 ) ) ;
N f i l r e f f f t = length( f i l r e f f f t ) ;
p l o t f i l r e f f f t = 10log10( f i l r e f f f t /max( f i l r e f f f t ) ) ;
% f requency base
f r e q b a s e r e f = ( 0 : N r e f f f t 1) Fnyqui st /( N r e f f f t 1 ) ;
i f ( ShowPlots ) ;
fi gure ( 3 ) ;
c l f ;
hold on ;
t i t l e ( [ Shot i nt2str ( shot ) : Ref er ence FFT ] , FontSi ze , 14) ;
plot ( f r e q b a s e r e f /1e6 , p l o t r e f f f t , r ) ;
plot ( f r e q b a s e r e f /1e6 , p l o t f i l r e f f f t , b ) ;
h3 = legend( Raw , Fi l t e r e d ) ;
set ( h3 , I nt e r pr e t e r , none ) ;
xlabel ( Frequency [MHz] , FontSi ze , 12 , FontWeight , bol d ) ;
fi gure ( gcf ) ;
end;
62
%%
% scene s i g na l
% u nf i l t e r e d scene s i g na l
s i g f f t dum = abs ( f f t ( c s i g ) ) ;
N s i g f f t dum = length( s i g f f t dum ) ;
s i g f f t = s i g f f t dum ( 1 : round( N s i g f f t dum / 2 ) ) ;
N s i g f f t = length( s i g f f t ) ;
p l o t s i g f f t = 10log10( s i g f f t /max( s i g f f t ) ) ;
% f i l t e r e d scene s i g na l
f i l s i g f f t d u m = abs ( f f t ( f i l s i g ) ) ;
N f i l s i g f f t dum = length( f i l s i g f f t d u m ) ;
f i l s i g f f t = f i l s i g f f t d u m ( 1 : round( N f i l s i g f f t dum / 2 ) ) ;
N f i l s i g f f t = length( f i l s i g f f t ) ;
p l o t f i l s i g f f t = 10log10( f i l s i g f f t /max( f i l s i g f f t ) ) ;
% f requency base
f r e q ba s e s i g = ( 0 : N s i g f f t 1) Fnyqui st /( N s i g f f t 1 ) ;
i f ( ShowPlots ) ;
fi gure ( 4 ) ;
c l f ;
hold on ;
t i t l e ( [ Shot i nt2str ( shot ) : Scene FFT ] , FontSi ze , 14) ;
plot ( f r e q ba s e s i g /1e6 , p l o t s i g f f t , r ) ;
plot ( f r e q ba s e s i g /1e6 , p l o t f i l s i g f f t , b ) ;
h3 = legend( Raw , Fi l t e r e d ) ;
set ( h3 , I nt e r pr e t e r , none ) ;
xlabel ( Frequency [MHz] , FontSi ze , 12 , FontWeight , bol d ) ;
fi gure ( gcf ) ;
end;
%%
%%
% f i nd t he zero c r os s i ng s of t he f i l t e r e d s i g na l s
%%
% r ef e r e nc e f i l t e r e d s i g na l
% mul t i pl y s uc c e s s i v e poi nt s of t he f i l t e r e d s i g na l
r e f f i l z e r o s = f i l r e f ( 1 : poi nt s 1) . f i l r e f ( 2 : poi nt s ) ;
% cr eat e vect or wi t h 1 s at c r os s i ng s and 0 el s ewher e
r e f f i l z e r o s = ( r e f f i l z e r o s . / abs ( r e f f i l z e r o s ) 1)/( 2);
63
% f i nd t he l o c a t i o ns of t he c r os s i ng poi nt s
k r e f = find ( r e f f i l z e r o s ) ;
% f i nd t he t o t a l number of zero c r os s i ng s of f i l t e r e d s i g na l
z c t r e f f i l = sum( r e f f i l z e r o s ) ;
%%
% c a l c ul a t i o ns used t o f i nd t he change i n phase of t he r e f s i g na l
% t h i s f i nds t he ti me t hat t he zero c r os s i ng a c t u a l l y occurs by
% i nt e r p o l a t i ng bet ween t he poi nt b e f or e and a f t e r t he zero c r os s i ng
t r e f ( 1 : z c t r e f f i l ) = t ( k r e f ) dt f i l r e f ( k r e f ) . / ( f i l r e f ( k r e f +1) . . .
f i l r e f ( k r e f ) ) ;
% c r e at e s a vect or t he s i z e of t he number of zero c r os s i ng s
% each zero c r os s i ng i nc r e as e s t he val ue by pi
% zc1 = pi , zc2 = 2 pi , zc3 = 3 pi
% t h i s al l ows t he zero c r os s i ng s t o be changed t o a measurement i n radi ans
phas e r e f = cumsum( pi ones ( si ze ( t r e f ) ) ) ;
% c r e at e s a new ti me base
% i t i s necessary t o choose a s t a r t ti me and end ti me bet ween t he croppi ng
% t i mes so t hat t he i nt er p1 f unct i on wi l l g i v e v al ue s
t ba s e s t a r t = 0. 0003;
t bas e end = 0 . 0 1 ;
% t h i s i s t he f requency t hat poi nt s wi l l be p l o t t e d
dtbase = 0. 5 e 6;
% ac t ual de f i ni ng of t he ti me base
t bas e = t ba s e s t a r t : dtbase : t bas e end ;
% i nv e r t s t he mat ri x f or t he i nt er p1 f unct i on
t bas e = tbase ;
% i nt e r p o l a t e s t he pr ogr es s i on of t he pl ot , usi ng t he zero c r os s i ng s as t he
% de f i ni ng poi nt s of t he p l o t
% ph r e f i s t he phase val ue at each poi nt of t bas e
ph r e f = interp1 ( t r e f , phas e r ef , t bas e ) ;
% t he val ue of t he r e f s i g na l compared t o i t s f i r s t val ue
va l ph r e f = ph r e f ph r e f ( 1 ) ;
%%
% scene f i l t e r e d s i g na l
% mul t i pl y s uc c e s s i v e poi nt s of t he f i l t e r e d s i g na l
64
s i g f i l z e r o s = f i l s i g ( 1 : poi nt s 1) . f i l s i g ( 2 : poi nt s ) ;
% cr eat e vect or wi t h 1 s at c r os s i ng s and 0 el s ewher e
s i g f i l z e r o s = ( s i g f i l z e r o s . / abs ( s i g f i l z e r o s ) 1)/( 2);
% f i nd t he l o c a t i o ns of t he c r os s i ng poi nt s
k s i g = find ( s i g f i l z e r o s ) ;
% f i nd t he t o t a l number of zero c r os s i ng s of f i l t e r e d s i g na l
z c t s i g f i l = sum( s i g f i l z e r o s ) ;
%%
% c a l c ul a t i o ns used t o f i nd t he change i n phase of t he scene s i g na l
% t h i s f i nds t he ti me t hat t he zero c r os s i ng a c t u a l l y occurs by
% i nt e r p o l a t i ng bet ween t he poi nt b e f or e and a f t e r t he zero c r os s i ng
t det ( 1 : z c t s i g f i l ) = t ( k s i g ) dt f i l s i g ( k s i g ) . / ( f i l s i g ( k s i g +1) . . .
f i l s i g ( k s i g ) ) ;
% c r e at e s a vect or t he s i z e of t he number of zero c r os s i ng s
% each zero c r os s i ng i nc r e as e s t he val ue by pi
% zc1 = pi , zc2 = 2 pi , zc3 = 3 pi
% t h i s al l ows t he zero c r os s i ng s t o be changed t o a measurement i n radi ans
phas e s i g = cumsum( pi ones ( si ze ( t det ) ) ) ;
% t h i s c a l c ul a t i o n uses t he same t bas e as from t he r e f s i g na l c a l c ul a t i o n
% i nt e r p o l a t e s t he pr ogr es s i on of t he pl ot , usi ng t he zero c r os s i ng s as t he
% de f i ni ng poi nt s of t he p l o t
% ph r e f i s t he phase val ue at each poi nt of t bas e
ph s i g = interp1 ( tdet , phas e s i g , t bas e ) ;
% t he val ue of t he scene s i g na l compared t o i t s f i r s t val ue
va l ph s i g = ph s i g ph s i g ( 1 ) ;
%%
% t he phase change bet ween t he scene and r e f s i g na l s
de l t a phi = va l ph r e f va l ph s i g ;
%%
%%
% l ook f or bad s pot s i n t he r e f s i g na l
% pl ac e s where t he ave ampl i t ude of t he s i g na l i s l e s s than 0. 3 t i mes t he
% o v e r a l l ave ampl i t ude
% t he sum of t he s quares of a l l poi nt s of t he f i l t e r e d r e f s i g na l
r e f s t r e ng t h = sum( f i l r e f . 2) / poi nt s ;
65
% de f i ne s t he window over which t o average t he s i g na l s t r e ng t h
% number of poi nt s i n 50 per i ods
bad spot wi ndow = round( 1/( s i g f r e q dt ) ) ;
%i n i t i a l i z e t he vect or
bad s pot r e f = zeros ( 1 , poi nt s ) ;
% l ook i ng over a gi ven i nt e r v a l
% t h i s al gor i t hm c a l c u l a t e s t he average s i g na l s t r e ng t h over a gi ven
% i nt e r v a l and c r e at e s a vect or marking t he l oc at i on of t he bad s pot s
for k = 1: round( bad spot wi ndow /2) : poi nt s bad spot wi ndow 1;
l o c a l s t r e n g t h r e f = sum( f i l r e f ( k : k + bad spot wi ndow ) . 2 ) . . .
/bad spot wi ndow ;
i f ( l o c a l s t r e n g t h r e f < . 3 r e f s t r e ng t h ) ;
bad s pot r e f ( k : k + bad spot wi ndow 1) = . . .
ones ( 1 , bad spot wi ndow ) ;
end;
end;
% i nt e r p o l a t e t he bad s pot s onto t he ti me r at e
i nt e r p bs r = interp1 ( t , bad s pot r e f , t bas e ) ;
%%
% l ook f or bad s pot s i n t he scene s i g na l
% pl ac e s where t he ave ampl i t ude of t he s i g na l i s l e s s than 0. 3 t i mes t he
% o v e r a l l ave ampl i t ude
% t he sum of t he s quares of a l l poi nt s of t he f i l t e r e d r e f s i g na l
s i g s t r e ng t h = sum( f i l s i g . 2) / poi nt s ;
%i n i t i a l i z e t he vect or
bad s pot s i g = zeros ( 1 , poi nt s ) ;
% l ook i ng over a gi ven i nt e r v a l
% t h i s al gor i t hm c a l c u l a t e s t he average s i g na l s t r e ng t h over a gi ven
% i nt e r v a l and c r e at e s a vect or marking t he l oc at i on of t he bad s pot s
for k = 1: round( bad spot wi ndow /2) : poi nt s bad spot wi ndow 1;
l o c a l s t r e n g t h s i g = sum( f i l s i g ( k : k + bad spot wi ndow ) . 2 ) . . .
/bad spot wi ndow ;
i f ( l o c a l s t r e n g t h s i g < . 04 s i g s t r e ng t h ) ;
bad s pot s i g ( k : k + bad spot wi ndow 1) = . . .
ones ( 1 , bad spot wi ndow ) ;
end;
end;
% i nt e r p o l a t e t he bad s pot s onto t he ti me r at e
i nt e r p bs s = interp1 ( t , bad s pot s i g , t bas e ) ;
%%
%%
66
i f ( ShowPlots ) ;
fi gure ( 2 2 ) ;
plot ( t det ( 1 : end 1)1 e3 , 1. /( 2( t det ( 2 : end) t det ( 1 : end1)))/1 e6 ) ;
t i t l e ( [ Shot i nt2str ( shot ) . . .
: Frequency of each hal f per i od ( Scene ) ] , FontSi ze , 14) ;
xlabel ( Time [ ms ] , FontSi ze , 12 , FontWeight , bol d ) ;
ylabel ( Frequency [MHz] , FontSi ze , 12 , FontWeight , bol d ) ;
fi gure ( gcf ) ;
fi gure ( 2 3 ) ;
plot ( t r e f ( 1 : end 1)1 e3 , 1. /( 2( t r e f ( 2 : end) t r e f ( 1 : end1)))/1 e6 ) ;
t i t l e ( [ Shot i nt2str ( shot ) . . .
: Frequency of each hal f per i od ( Ref ) ] , FontSi ze , 14) ;
xlabel ( Time [ ms ] , FontSi ze , 12 , FontWeight , bol d ) ;
ylabel ( Frequency [MHz] , FontSi ze , 12 , FontWeight , bol d ) ;
fi gure ( gcf ) ;
end
%%
%%
% p l o t of bot h f i l t e r e d s i g na l s and t he phase d i f f e r e nc e
m ref = max( f i l r e f ) ;
m si g = max( f i l s i g ) ;
fi gure ( 5 ) ;
c l f ;
t i t l e ( [ Shot i nt2str ( shot ) : Fi l t e r e d Si gnal s ] , FontSi ze , 14) ;
hold on ;
plot ( t m , pi f i l r e f /m ref , b , t m , pi f i l s i g /m si g , r ) ;
plot ( t bas e 1e3 , mod( de l t a phi , 2pi ) + pi , k ) ;
h5 = legend( Ref er ence , Scene , Phase Change ) ;
set ( h5 , I nt e r pr e t e r , none ) ;
xlabel ( Time [ ms ] , FontSi ze , 12 , FontWeight , bol d ) ;
grid ;
fi gure ( gcf ) ;
%%
%%
% de ns i t y c a l c ul a t i o n
% de f i ne v a r i a b l e s
% speed of l i g h t [m/s ]
c = 3e8 ;
67
% e l e c t r on mass [ kg ]
m e = 9. 109382 e 31;
% magnitude of e l e c t r on charge [C]
q e = 1. 6021765 e 19;
% p e r mi t t i v i y of f r e e space [C2 N1 m2]
e0 = 8. 8541878 e 12;
% a common q uant i t y
cons t ant = q e 2/(4 pi 2 e0m e ) ;
% wavel engt h of di f l uoromet hane
lambda = . 0001843;
% c a l c u l a t e s t he l i ne i nt e g r at e d de ns i t y
dens i t y = c 2 de l t a phi /(2 pi lambda cons t ant ) ;
% i nv e r t s t he p l o t i f t he de ns i t y i s neg at i v e
graph note = 0;
i f ( dens i t y ( 2000) < 0)
dens i t y = dens i t y ;
graph note = 1;
end
% l i ne i nt e g r at e d de ns i t y of one f r i ng e ( de l t a ph = 2 pi )
one f r i nge = c 2/( lambda cons t ant ) ;
% t he number of poi nt s i n t he de ns i t y vect or
N densi ty = length( dens i t y ) ;
% t he averaged de ns i t y over t he chord
de ns i t y ave = dens i t y / chor d l engt h1 ;
% one f r i ng e averaged over t he chord ;
one f r i nge ave = one f r i nge / chor d l engt h1 ;
%%
%%
% t he aut o c or r e c t i on al gor i t hm
number f r i nges up = 0;
number f ri nges down = 0;
i f AutoCorrect == 1;
for k = 2: length( dens i t y ) ;
i f ( dens i t y ( k) dens i t y ( k1)) > one f r i nge ;
68
number f ri nges down = number f ri nges down 1;
dens i t y ( k : length( dens i t y ) ) = dens i t y ( k : length( dens i t y ) ) . . .
one f r i nge ;
end;
i f ( dens i t y ( k) dens i t y ( k1)) < one f r i nge ;
number f r i nges up = number f r i nges up + 1;
dens i t y ( k : length( dens i t y ) ) = dens i t y ( k : length( dens i t y ) ) . . .
+ one f r i nge ;
end;
end;
end;
%%
%%
% l ook f or b i g jumps i n t he de ns i t y
BigJump = zeros ( 1 , N densi ty ) ;
for k = 2: N densi ty ;
i f abs ( dens i t y ( k) dens i t y ( k1)) > one f r i nge /2;
BigJump( k) = 1;
end;
end;
%%
%%
% c a l c u l a t e s t he t o t a l de ns i t y i nt e g r at e d over t he chord
i f ( ShowPlots )
fi gure ( 6 ) ;
c l f ;
grid ;
t i t l e ( [ Shot i nt2str ( shot ) . . .
: Li ne I nt egr aged Densi ty ] , FontSi ze , 14) ;
hold on ;
plot ( t bas e 1e3 , densi t y , b ) ;
xlabel ( Time [ ms ] , FontSi ze , 12 , FontWeight , bol d ) ;
ylabel ( Densi ty Chord Length [m2] , FontSi ze , 12 , . . .
FontWeight , bol d ) ;
fi gure ( gcf ) ;
end
%%
%%
% i nt e r a c t i v e program t o c or r e c t f r i ng e jumps i n de ns i t y dat a
% al s o al l ows l i ne s t o be f i t t e d t o t he dat a
69
% number of f r i ng e jumps moved usi ng t he c or r e c t i on program
jumps = 0;
% number of r egi ons averaged over
s pot s = 0;
% ti me where f r i ng e jumps occured
jumptimes ( 1) = 0;
% t he o v e r a l l change i n de ns i t y due t o jumps
% ( up = 1 , down = 1 f r i ng e jumps )
jumpchanges ( 1) = 0;
% begi nni ng ti me of an averaged regi on
spotti mesb ( 1) = 0;
% end ti me of an averaged regi on
s pot t i mes e ( 1) = 0;
% i n i t i a l i z e v a r i a b l e
q ui t c o r r e c t i o n = 0;
% s t a r t program
while ( strcmp( qui t c o r r e c t i on , q ) == 0)
% t he max de ns i t y
max densi ty = max( de ns i t y ave ) ;
% p l o t s t he average de ns i t y over t he chord
fi gure ( 7 ) ;
c l f ;
t i t l e ( [ Shot i nt2str ( shot ) . . .
: Li ne Averaged Densi ty ] , FontSi ze , 14) ;
grid ;
hold on ;
plot ( t bas e 1e3 , dens i t y ave , b ) ;
% bad s pot s i n t he r e f s i g na l
plot ( t bas e 1e3 , i nt e r p bs r max densi ty , g ) ;
% bad s pot s i n t he scene s i g na l
plot ( t bas e 1e3 , i nt e r p bs s max densi ty , c ) ;
% b i g jumps i n de ns i t y
plot ( t bas e 1e3 , BigJumpmax densi ty , k ) ;
% put s a not e on t he graph i f t he de ns i t y has been i nv e r t e d
i f ( graph note )
text ( 0 , max densi ty /12 , Thi s pl ot has been i nve r t e d ) ;
end
h7 = legend( Raw Data , Weak Si gnal ( r e f ) , . . .
Weak Si gnal ( s cene ) , Big Jumps i n Densi ty ) ;
set ( h7 , I nt e r pr e t e r , none ) ;
70
xlabel ( Time [ ms ] , FontSi ze , 12 , FontWeight , bol d ) ;
ylabel ( Densi ty [m3] , FontSi ze , 12 , FontWeight , bol d ) ;
disp( ) ;
disp( Press ent er to make c o r r e c t i o ns to the pl ot . ) ;
disp( During c o r r e c t i o n : 1 = move pl ot down one f r i ng e ) ;
disp( 7 = move pl ot up one f r i ng e ) ;
disp( [ = s t a r t aver agi ng of pl ot ) ;
disp( ] = end aver agi ng of pl ot ) ;
disp( 5 = adj us t the dens i t y up or down ) ;
disp( b = smooth the pl ot ) ;
q ui t c o r r e c t i o n = input ( Enter q to qui t . , s ) ;
i f ( strcmp( qui t c o r r e c t i o n , q ) == 0)
[ xa , ya , button ] = ginput ( 1 ) ;
% adj us t s t he de ns i t y down one f r i ng e
i f button == 1
jumps = jumps + 1;
jumptimes ( jumps ) = xa ;
jumpchanges ( jumps ) = 1;
[ a1 , I 1 ] = min( ( xa t bas e 1 e3 ) . 2 ) ;
de ns i t y ave ( I 1 : N densi ty ) = de ns i t y ave ( I 1 : N densi ty ) . . .
one f r i nge ave ;
% adj us t s t he de ns i t y up one f r i ng e
el s e i f button == 7
jumps = jumps + 1;
jumptimes ( jumps ) = xa ;
jumpchanges ( jumps ) = 1;
[ a2 , I 2 ] = min( ( xa t bas e 1 e3 ) . 2 ) ;
de ns i t y ave ( I 2 : N densi ty ) = de ns i t y ave ( I 2 : N densi ty ) . . .
+ one f r i nge ave ;
% averages t he de ns i t y over an i nt e r v a l
% begi n averagi ng ti me
el s e i f button == [
Fi r s t t i me = xa ;
% end averagi ng ti me
[ xb , yb , button ] = ginput ( 1 ) ;
i f ( button == ] )
Second ti me = xb ;
[ a3 , I 3 ] = min( ( Fi r s t t i me t bas e 1 e3 ) . 2 ) ;
[ a4 , I 4 ] = min( ( Second ti me t bas e 1 e3 ) . 2 ) ;
s pot s = s pot s + 1;
spotti mesb ( s pot s ) = Fi r s t t i me ;
s pot t i mes e ( s pot s ) = Second ti me ;
de ns i t y ave ( I 3 : I 4 ) = de ns i t y ave ( I 3 ) + ( de ns i t y ave ( I 4 ) . . .
de ns i t y ave ( I 3 ) ) ( ( I 3 : I 4 ) I 3 ) /( I 4 I 3 ) ;
end
71
% adj us t s t he de ns i t y up or down
el s e i f button == 5
adj us t = input ( Amount to adj ust , i . e . 3e18 et c . : ) ;
for k = 1: N densi ty
de ns i t y ave ( k) = de ns i t y ave ( k) + adj us t ;
end
% smoothes t he p l o t by averagi ng t he de ns i t y over an i nt e r v a l 2w
el s e i f button == b
% r e s e t s t he de ns i t y t o t he o r i g i na l c a l c ul a t e d de ns i t y
de ns i t y ave = dens i t y / chor d l engt h1 ;
disp( ) ;
disp( What i nt e r v a l do you want to average the dens i t y over ? ) ;
ave window = input ( Input ti me i n mi l l i s e c o nds . ) ;
% di v i de by 2 becauses t he i nt e r v a l i s 2w
ave window = ave window/2000;
w = round( ave window/ dtbase ) ;
% mi ddl e of t he p l o t
for n = w: N densi ty w
de ns i t y ave ( n) = mean( de ns i t y ave ( n w + 1: n + w) ) ;
end
% end of t he p l o t
for n = N densi ty w + 1: N densi ty
de ns i t y ave ( n) = de ns i t y ave ( N densi ty w) ;
end;
% begi nni ng of t he p l o t
for n = 1: w 1
de ns i t y ave ( n) = de ns i t y ave (w) ;
end;
end
end
end
fi gure ( gcf ) ;
%%
%%
% p l o t s t he dat a a f t e r any c or r e c t i ons have been made
fi gure ( 8 ) ;
c l f ;
t i t l e ( [ Shot i nt2str ( shot ) : Li ne Averaged Densi ty ] , FontSi ze , 14) ;
grid ;
72
hold on ;
plot ( t bas e 1e3 , dens i t y ave , b ) ;
xlabel ( Time [ ms ] , FontSi ze , 12 , FontWeight , bol d ) ;
ylabel ( Densi ty [m3] , FontSi ze , 12 , FontWeight , bol d ) ;
fi gure ( gcf ) ;
%%
%%
% f i t t he de ns i t y p l o t t o a curve
% l e ng t h of sampl e t o average over
n f i t = 100;
f i t d e n s i t y = zeros ( 1 , N densi ty n f i t ) ;
for j = 1: N densi ty n f i t
for k = 1: n f i t
f i t d e n s i t y ( j ) = f i t d e n s i t y ( j ) + de ns i t y ave ( j + k 1 ) ;
end
end
f i t d e n s i t y = f i t d e n s i t y / n f i t ;
f i t max = max( f i t d e n s i t y ) ;
t b a s e f i t = t bas e ( n f i t /2: end n f i t /2 1 ) ;
%%
%%
disp ( [ Max Densi ty : num2str(max( de ns i t y ave )1 e 19) . . .
1019 [m3] ] ) ;
% out put t he number of jumps
Njumps = de ns i t y ave (end 20)/ one f r i nge ave ;
disp ( [ There were i nt2str ( Njumps ) jumps ] ) ;
%%
%%
% Write dat a out t o a f i l e Need t h i s f or b a s e l i ne s
wr i t e f i l e = n ;
wr i t e f i l e i n = input ( [ Al l done . Do you want to save data to . . .
s : \\ bvi c t or \\FIRdata\\ ? [ y/n ] ] , s ) ;
i f ( wr i t e f i l e i n )
wr i t e f i l e = wr i t e f i l e i n ;
end;
73
i f ( strcmp( wr i t e f i l e , y ) )
f i l e o u t = [ s : \ FIRdata\ dens i t y \d1 i nt2str ( shot ) . dat ] ;
eval ( [ save f i l e o u t de ns i t y ave a s c i i ] )
f i l e o u t = [ s : \ FIRdata\ s ho t i nf o \ c1 i nt2str ( shot ) . dat ] ;
eval ( [ save f i l e o u t shot hbwref hbwdet jumps . . .
jumptimes jumpchanges s pot s spotti mesb s pot t i mes e a s c i i ] ) ;
f i l e o u t = [ s : \ FIRdata\TimeBase\ t 1 i nt2str ( shot ) . dat ] ;
eval ( [ save f i l e o u t t bas e a s c i i ] ) ;
f i l e o u t = [ s : \ FIRdata\smooth den\ f i t 1 i nt2str ( shot ) . dat ] ;
eval ( [ save f i l e o u t f i t d e n s i t y a s c i i ] )
disp( Data was wr i t t en to f i l e . ) ;
end;
i f ( strcmp( wr i t e f i l e , n ) )
disp( Data was NOT wr i t t en to f i l e . ) ;
end;
%%
%%
% Write dat a t o t r e e
t r e e wr i t e = n ;
t r e e wr i t e i n = input ( [ Do you want to keep t hi s data and wr i t e . . .
to the t r e e ? [ y/n ] ] , s ) ;
i f ( t r e e wr i t e i n )
t r e e wr i t e = t r e e wr i t e i n ;
end;
i f ( strcmp( t r e e wr i t e , y ) )
[ a , s t at us ] = mdsopen( l andau . hi t : : h i t s i , shot ) ;
mdsput ( \N AVG S1 , [ bui l d s i g na l ( bui l d wi t h uni t s ( $1 , m3) , . . .
, bui l d wi t h uni t s ( $2 , s ) ) ] , dens i t y ave , t bas e ) ;
%mdsput ( \N AVG S1: BASELINE , $ , b as e l i ne ) ;
%mdsput ( \N AVG S1:HBWREF , $ , hbwref ) ;
%mdsput ( \N AVG S1:HBWDET , $ , hbwdet ) ;
%mdsput ( \N AVG S1:JUMPS , $ , ch1jumps ) ;
%mdsput ( \N AVG S1:JUMPTIMES , $ , ch1j umpti mes ) ;
%mdsput ( \N AVG S1:JUMPCHANGES , $ , ch1jumpchanges ) ;
%mdsput ( \N AVG S1: SPOTS , $ , ch1s pot s ) ;
%mdsput ( \N AVG S1:SPOTTIMESB , $ , ch1s pot t i mes b ) ;
%mdsput ( \N AVG S1: SPOTTIMESE , $ , ch1s pot t i mes e ) ;
pause ( . 2 )
mdscl ose ;
mdsdi sconnect ;
disp( Data was wr i t t en to the t r e e . ) ;
end;
i f ( strcmp( t r e e wr i t e , n ) )
74
disp( Data was NOT wr i t t en to t r e e . ) ;
end;
%%
%%
% Update t he i ni f i l e .
next s hot = shot + 1;
save f i r i n i . dat next s hot a s c i i ;
%%
%%
75
E.2 Tau Based Upon Plateau Density
This le is located on the HITSI server at
U:\bvictor\Matlab\gas\puff_data_integrate3.m
% t h i s program i nt e g r a t e s t he puf f dat a
cl ear al l ;
cl ose al l ;
%%
% YSi de
% 5000 Torr N/O v al v e l e f t open
% Using s hot 114778
a1 = 114778;
% 5000 Torr N/O v al v e s e t t o c l os e as i n normal oper at i on
% Using s hot 114779
a2 = 114779;
% 3000 Torr N/O v al v e l e f t open
% Using s hot 114783
a3 = 114783;
% 3000 Torr N/O v al v e s e t t o c l os e as i n normal oper at i on
% Using s hot 114782
a4 = 114782;
% 2000 Torr N/O v al v e l e f t open
% Using s hot 114786
a5 = 114786;
% 2000 Torr N/O v al v e s e t t o c l os e as i n normal oper at i on
% Using s hot 114795
a6 = 114795;
% 1000 Torr N/O v al v e l e f t open
% Using s hot 114791
a7 = 114791;
% 1000 Torr N/O v al v e s e t t o c l os e as i n normal oper at i on
% Using s hot 114794
a8 = 114794;
%%
% XSi de
% 5000 Torr N/O v al v e l e f t open
% Using s hot 114812
a9 = 114812;
76
% 5000 Torr N/O v al v e s e t t o c l os e as i n normal oper at i on
% Using s hot 114816
a10 = 114816;
% 3000 Torr N/O v al v e l e f t open
% Using s hot 114808
a11 = 114808;
% 3000 Torr N/O v al v e s e t t o c l os e as i n normal oper at i on
% Using s hot 114807
a12 = 114807;
% 2000 Torr N/O v al v e l e f t open
% Using s hot 114800
a13 = 114800;
% 2000 Torr N/O v al v e s e t t o c l os e as i n normal oper at i on
% Using s hot 114799
a14 = 114799;
% 1000 Torr N/O v al v e l e f t open
% Using s hot 114802
a15 = 114802;
% 1000 Torr N/O v al v e s e t t o c l os e as i n normal oper at i on
% Using s hot 114805
a16 = 114805;
%%
% t he number of p a r t i c l e s o r i g i n a l l y i n t he plenum
% see gas vol ume .m and g a s p a r t i c l e s .m
% Ys i de
% 5000 Torr
np1 = 14. 4 e19 ;
% 3000 Torr
np2 = 8. 6 e19 ;
% 2000 Torr
np3 = 5. 8 e19 ;
% 1000 Torr
np4 = 2. 9 e19 ;
% Xs i de
% 5000 Torr
np5 = 15. 7 e19 ;
% 3000 Torr
np6 = 9. 4 e19 ;
% 2000 Torr
77
np7 = 6. 3 e19 ;
% 1000 Torr
np8 = 3. 1 e19 ;
%%
s hot y = [ a1 a2 a3 a4 a5 a6 a7 a8 ] ;
s hot x = [ a9 a10 a11 a12 a13 a14 a15 a16 ] ;
for j = 1: 8;
mdsopen( l andau . hi t : : h i t s i , s hot y ( j ) ) ;
puf f y ( j , : ) = mdsvalue ( p r e s s y i n j = \ pr e s s y i nj ) ;
t y ( j , : ) = mdsvalue ( di m of ( p r e s s y i n j ) ) ;
dt y ( j ) = mdsvalue ( s ampl i ngi nt e r val ( p r e s s y i n j ) ) ;
mdscl ose ;
mdsopen( l andau . hi t : : h i t s i , s hot x ( j ) ) ;
puf f x ( j , : ) = mdsvalue ( p r e s s x i n j = \ pr e s s x i nj ) ;
t x ( j , : ) = mdsvalue ( di m of ( p r e s s x i n j ) ) ;
dt x ( j ) = mdsvalue ( s ampl i ngi nt e r val ( p r e s s x i n j ) ) ;
mdscl ose ;
s ampl e r at e = 1/ dt y ( 1 ) ;
Fnyqui st = s ampl e r at e /2;
f o r de r = 4; % order of t he f i l t e r /2
bw cut of f = 1000; % cuto f f f r e q
c ut o f f = bw cut of f / Fnyqui st ;
[ bb , aa ] = but t er ( f or de r , c ut o f f ) ; % b ut t e r f i l t e r
f i l t p u f f y ( j , : ) = f i l t f i l t ( bb , aa , puf f y ( j , : ) ) ;
f i l t p u f f x ( j , : ) = f i l t f i l t ( bb , aa , puf f x ( j , : ) ) ;
ba s e l i ne y = sum( puf f y ( j , (end 1000: end) ) ) /1001;
ba s e l i ne x = sum( puf f x ( j , (end 1000: end) ) ) /1001;
f i l t b a s e y ( j , : ) = f i l t p u f f y ( j , : ) ba s e l i ne y ;
f i l t b a s e x ( j , : ) = f i l t p u f f x ( j , : ) ba s e l i ne x ;
[ puf f max y ( j ) , nm y( j ) ] = max( f i l t b a s e y ( j , : ) ) ;
[ puf f max x ( j ) , nm x( j ) ] = max( f i l t b a s e x ( j , : ) ) ;
peak t y ( j ) = t y ( j , nm y( j ) ) ;
peak t x ( j ) = t x ( j , nm x( j ) ) ;
% search f or where puf f pr es s ur e i n i t i a l l y c r os s e s zero
[ pz y ( j ) , nz y ( j ) ] = min( f i l t b a s e y ( j , 1: 30000) . 2) ;
[ pz x ( j ) , nz x ( j ) ] = min( f i l t b a s e x ( j , 1: 30000) . 2) ;
% ti me t h i s occurs
z t y ( j ) = t y ( j , nz y ( j ) ) ;
78
z t x ( j ) = t x ( j , nz x ( j ) ) ;
% i nt e g r a t i ng t he curve
pi y = ( t y ( j , nz y ( j ) + 1: end) t y ( j , nz y ( j ) : end 1 ) ) . . . .
( f i l t b a s e y ( j , nz y ( j ) : end 1) + . . .
f i l t b a s e y ( j , nz y ( j ) + 1: end) ) / 2 ;
pi x = ( t x ( j , nz x ( j ) + 1: end) t x ( j , nz x ( j ) : end 1 ) ) . . . .
( f i l t b a s e x ( j , nz x ( j ) : end 1) + . . .
f i l t b a s e x ( j , nz x ( j ) + 1: end) ) / 2 ;
% summing t he i nt e g r a l
ps y ( j ) = sum( pi y ) ;
ps x ( j ) = sum( pi x ) ;
end;
% t he c a l c ul a t i o n f or t he cons t ant of p r o p o r t i o na l i t y comes from t he
% program puf f dat a c ons t ant pr op .m
cp y = 3. 955 e 22;
cp x = 4. 772 e 22;
% now t he f l ow r at e can be c a l c ul a t e d by di v i di ng t he pr es s ur e at a gi ven
% ti me by t he cons t ant of p r o p o r t i o na l i t y
% t he ac t ual ci rcumst ances t he machine i s run at i s when t he N/O v al v e i s
% cl os i ng , so I wi l l l ook at t hos e cas es
% I am i nt e r e s t e d i n t i mes bet ween 4 and 8 ms
t s = 0. 0042; % s t a r t ti me
t e = 0. 0072; % end ti me
[ aaa , I s y ] = min( ( t y ( 1 , : ) t s ) . 2 ) ; % s t a r t ti me
[ bbb , I ey ] = min( ( t y ( 1 , : ) t e ) . 2 ) ; % end ti me
[ aaa1 , I s x ] = min( ( t x ( 1 , : ) t s ) . 2 ) ; % s t a r t ti me
[ bbb1 , I ex ] = min( ( t x ( 1 , : ) t e ) . 2 ) ; % end ti me
for j = 1: 8;
t t y ( j , : ) = t y ( j , I s y : I ey ) ;
t t x ( j , : ) = t x ( j , I s x : I ex ) ;
end
% Ys i de
% 5000 Torr
f r y ( 1 , : ) = f i l t b a s e y ( 2 , I s y : I ey )/ cp y ;
% 3000 Torr
f r y ( 2 , : ) = f i l t b a s e y ( 4 , I s y : I ey )/ cp y ;
% 2000 Torr
f r y ( 3 , : ) = f i l t b a s e y ( 6 , I s y : I ey )/ cp y ;
79
% 1000 Torr
f r y ( 4 , : ) = f i l t b a s e y ( 8 , I s y : I ey )/ cp y ;
% Xs i de
% 5000 Torr
f r x ( 1 , : ) = f i l t b a s e x ( 2 , I s x : I ex )/ cp x ;
% 3000 Torr
f r x ( 2 , : ) = f i l t b a s e x ( 4 , I s x : I ex )/ cp x ;
% 2000 Torr
f r x ( 3 , : ) = f i l t b a s e x ( 6 , I s x : I ex )/ cp x ;
% 1000 Torr
f r x ( 4 , : ) = f i l t b a s e x ( 8 , I s x : I ex )/ cp x ;
fi gure ( 4 0 ) ;
c l f ;
for j = 1: 4
plot ( t t y ( j , : ) , f r y ( j , : ) , b ) ;
hold on ;
plot ( t t x ( j , : ) , f r x ( j , : ) , r ) ;
end
% t he t o t a l f l ow r at e i s t he summation of t he f l ow i nt o each i nj e c t o r
% 5000 Torr
f r ( 1 , : ) = f r y ( 1 , : ) + f r x ( 1 , : ) ;
% 3000 Torr
f r ( 2 , : ) = f r y ( 2 , : ) + f r x ( 2 , : ) ;
% 2000 Torr
f r ( 3 , : ) = f r y ( 3 , : ) + f r x ( 3 , : ) ;
% 1000 Torr
f r ( 4 , : ) = f r y ( 4 , : ) + f r x ( 4 , : ) ;
% t he e l e c t r on f l ow r at e i s t wi ce t he p a r t i c l e f l ow r at e f or He
f r e = 2 f r ;
% c a l c u l a t i ng t he ave p a r t i c l e f l ow r at e s
for j = 1: 4
ave x ( j ) = sum( f r x ( j , : ) ) / ( I ex I s x + 1 ) ;
ave y ( j ) = sum( f r y ( j , : ) ) / ( I ey I s y + 1 ) ;
ave t ( j ) = ave x ( j ) + ave y ( j ) ;
end
% e l e c t r on f l ow r at e s are as t hus
e ave x = 2 ave x ;
e ave y = 2 ave y ;
e ave t = 2 ave t ;
% now I need t o i mport t he end b as e l i ne d e ns i t i e s
80
% t he conf i nement ti me can be c a l c ul a t e d by di v i di ng t he end b as e l i ne
% de ns i t y by t he f l ow r at e
s hot p = xl s r e ad ( s : \ FIRdata\ j n peak ave n \ j n den . xl s , . . .
ps i 1 vf 1 , A2: A63 ) ;
n end ave = xl s r e ad ( s : \ FIRdata\ j n peak ave n \ j n den . xl s , . . .
ps i 1 vf 1 , H2: H63 ) ;
puf f = xl s r e ad ( s : \ FIRdata\ j n peak ave n \ j n den . xl s , . . .
ps i 1 vf 1 , I 2 : I 63 ) ;
f i l l = xl s r e ad ( s : \ FIRdata\ j n peak ave n \ j n den . xl s , . . .
ps i 1 vf 1 , J2 : J63 ) ;
v i nj = xl s r e ad ( s : \ FIRdata\ j n peak ave n \ j n den . xl s , . . .
ps i 1 vf 1 , K2: K63 ) ;
l p = length( puf f ) ;
% need t o s ub t r ac t o f f t he e f f e c t of t he f i l l de ns i t y t o get t he p a r t i c l e
% conf i nement ti me of t he i nj e c t e d puf f e l e c t r ons
% 2 mTorr of puf f corresponds t o an i ncr eas e of 0. 2 e19 e l e c t r ons /m3
np e = n end ave 0. 2 e19 f i l l ;
% t h i s number i s mul t i p l i e d by t he machine vol ume ( 0. 38 m3)
% t o get t he t o t a l number
% of p a r t i c l e s i n t he conf i nement regi on
t ot p = np e . . 3 8 ;
for j = 1: l p
i f puf f ( j ) == 5000;
tau = t ot p ( j ) . / f r e ( 1 , : ) ;
sum tau = sum( tau ) ;
ave tau ( j ) = sum( tau ) /( I ex I s x + 1 ) ;
ave tau2 ( j ) = t ot p ( j )/ e ave t ( 1 ) ;
el s e i f puf f ( j ) == 3000;
tau = t ot p ( j ) . / f r e ( 2 , : ) ;
sum tau = sum( tau ) ;
ave tau ( j ) = sum( tau ) /( I ex I s x + 1 ) ;
ave tau2 ( j ) = t ot p ( j )/ e ave t ( 2 ) ;
el s e i f puf f ( j ) == 2000;
tau = t ot p ( j ) . / f r e ( 3 , : ) ;
sum tau = sum( tau ) ;
ave tau ( j ) = sum( tau ) /( I ex I s x + 1 ) ;
ave tau2 ( j ) = t ot p ( j )/ e ave t ( 3 ) ;
el s e i f puf f ( j ) == 1000;
81
tau = t ot p ( j ) . / f r e ( 4 , : ) ;
sum tau = sum( tau ) ;
ave tau ( j ) = sum( tau ) /( I ex I s x + 1 ) ;
ave tau2 ( j ) = t ot p ( j )/ e ave t ( 4 ) ;
end;
end
for j = 1: l p
i f v i nj ( j ) == 275;
c ol or ( j ) = b ;
el s e i f v i nj ( j ) == 300;
c ol or ( j ) = c ;
el s e i f v i nj ( j ) == 325;
c ol or ( j ) = m ;
el s e i f v i nj ( j ) == 350;
c ol or ( j ) = r ;
end;
end
fi gure ( 1 ) ;
c l f ;
h20 = gca ;
get ( h20 , FontSi ze ) ;
set ( h20 , FontSi ze , 14) ;
for j = 1: l p
s c a t t e r ( puf f ( j ) , ave tau ( j )1 e3 , 40 , k , o , . . .
MarkerFaceCol or , c ol or ( j ) ) ;
hold on ;
end
xl i m ( [ 0 6 0 0 0 ] ) ;
yl i m ( [ 0 3 ] ) ;
grid ;
ylabel ( Tau [ ms ] , FontSi ze , 14 , FontWeight , bol d ) ;
xlabel ( I n i t i a l Puf f Plenum Pr es s ur e [ Torr ] , . . .
FontSi ze , 14 , FontWeight , bol d ) ;
t i t l e ( Pa r t i c l e Confi nement Time vs . Puf f Gas Pr es s ur e , . . .
FontSi ze , 16 , FontWeight , bol d ) ;
fi gure ( gcf ) ;
fi gure ( 2 ) ;
c l f ;
h20 = gca ;
get ( h20 , FontSi ze ) ;
set ( h20 , FontSi ze , 14) ;
for j = 1: l p
s c a t t e r ( puf f ( j ) , ave tau2 ( j )1 e3 , 40 , k , o , . . .
MarkerFaceCol or , c ol or ( j ) ) ;
hold on ;
end
xl i m ( [ 0 6 0 0 0 ] ) ;
82
yl i m ( [ 0 3 ] ) ;
grid ;
ylabel ( Tau [ ms ] , FontSi ze , 14 , FontWeight , bol d ) ;
xlabel ( I n i t i a l Puf f Plenum Pr es s ur e [ Torr ] , . . .
FontSi ze , 14 , FontWeight , bol d ) ;
t i t l e ( Pa r t i c l e Confi nement Time vs . Puf f Gas Pr es s ur e , . . .
FontSi ze , 16 , FontWeight , bol d ) ;
fi gure ( gcf ) ;
83
E.3 Tau Based Upon Density Decay Region
This le is located on the HITSI server at
U:\bvictor\Matlab\den_anal\n_initial_tau6.m
% de ns i t y anal y s i s
cl ear al l ;
shot = input ( Enter the shot to anal yze : ) ;
den = load ( [ s : \ FIRdata\ dens i t y \d1 i nt2str ( shot ) . dat ] ) ;
t = load ( [ s : \ FIRdata\TimeBase\ t 1 i nt2str ( shot ) . dat ] ) ;
% f i nd t he pl at eau de ns i t y t o s ub t r ac t o f f as a b as e l i ne
t s = 0. 0042; % new s t a r t ti me
t e = 0. 0072; % new end ti me
[ a , I s ] = min( ( tt s ) . 2 ) ; % f i nd t he poi nt near es t t he s t a r t ti me
[ b , I e ] = min( ( tt e ) . 2 ) ; % f i nd t he poi nt near es t t he end ti me
den sum = sum( den( I s : I e ) ) ;
den ave = den sum/( I e I s + 1 ) ;
dt = ( t (20001) t ( 1) ) /20000;
s ampl e r at e = 1/ dt ;
Fnyqui st = s ampl e r at e /2;
f o r de r = 4; % order of t he f i l t e r /2
bw cut of f = 3000; % cuto f f f r e q
c ut o f f = bw cut of f / Fnyqui st ;
[ b1 , a1 ] = but t er ( f or de r , c ut o f f ) ; % b ut t e r f i l t e r
f i l t d e n = f i l t f i l t ( b1 , a1 , den ) ; % uses b ut t e r v a r i a b l e t o c al c s i g na l
% t he de ns i t y wi t h t he pl at eau s ub t r ac t e d o f f
den sub = den den ave ;
% f i nd s t a r t and s t op of al gor i t hm
[ max den , max t ] = max( f i l t d e n ) ;
tps = 0. 0001; % s t a r t ti me a f t e r peak
tpe = 0. 0008; % end ti me a f t e r peak
[ pa , ps ] = min( ( t ( t ( max t)+tps ) ) . 2 ) ; % pt near t ps
[ pb , pe ] = min( ( t ( t ( max t)+tpe ) ) . 2 ) ; % pt near t pe
den exp = den sub ( ps : pe ) ;
t t = t ( ps : pe ) ; % crop t he ti me
l og den = log ( den exp ) ;
pc oe f f = pol yf i t ( tt , l og den , 1 ) ;
den tau = exp( pc oe f f ( 2) ) exp( pc oe f f ( 1) t ) ;
c den t au = den tau ( ps : I s ) ;
tau = 1/ pc oe f f ( 1 ) ;
84
fi gure ( 1 0 ) ;
c l f ;
h10 = gca ;
get ( h10 , FontSi ze ) ;
set ( h10 , FontSi ze , 14) ;
plot ( t 1e3 , den1e 19, r ) ;
hold on ;
plot ( t ( ps : I s )1 e3 , ( c den t au + den ave )1 e 19, b , LineWidth , 3 ) ;
%p l o t ( t 1e3 , f i l t d e n s u b + den ave , b , LineWidth , 2) ;
%p l o t ( t ( i nt e r v a l ) , e x p f i t , g , LineWidth , 2) ;
%p l o t ( t ( max t : end ) , e x p f i t 2 , c , LineWidth , 2) ;
grid ;
xl i m ( [ 0 1 0 ] ) ;
t i t l e ( Exponenti al Fi t to the Densi ty Decay Regi on , FontSi ze , 16) ;
xlabel ( Time [ ms ] , FontSi ze , 14 , FontWeight , bol d ) ;
ylabel ( Densi ty [ 1019 m3] , FontSi ze , 14 , FontWeight , bol d ) ;
legend( Densi ty , [ Tau = num2str(tau1e3 , 2) ms ] ) ;
85
E.4 j/n Calculation
This le is located on the HITSI server at
U:\bvictor\Matlab\den_anal\jn_calc0409.m
% f i l t e r s t he de ns i t y dat a and c a l c u l a t e s j /n usi ng i t o r f l t a y
cl ear al l ;
load s : \ Matlab\ den anal \ j n i n i . dat ;
shot = j n i n i ( 1 ) ;
s hot i n = input ( [ What shot ? Def aul t : [ i nt2str ( shot ) ] ] ) ;
i f ( s hot i n ) ;
shot = s hot i n ;
end;
den = load ( [ s : \ FIRdata\ dens i t y \d1 i nt2str ( shot ) . dat ] ) ;
t = load ( [ s : \ FIRdata\TimeBase\ t 1 i nt2str ( shot ) . dat ] ) ;
mdsopen( l andau . hi t : : h i t s i , shot ) ;
i t o r f l t a y = mdsvalue ( \ i t o r f l t a y ) ;
t i t o r = mdsvalue ( di m of (\ i t o r f l t a y ) ) ;
mdscl ose ;
% sampl i ng f requency of i t o r f l t a y = 10 kHz
% need t o f i l t e r t he de ns i t y dat a bel ow 5 kHz t o avoi d a l i a s i ng
N den = length( den ) ;
dt = ( t (20001) t ( 1) ) /20000;
s ampl e r at e = 1/ dt ;
Fnyqui st = s ampl e r at e /2;
nf = 4;
bw cut of f = 3000;
c ut o f f = bw cut of f / Fnyqui st ;
[ b1 , a1 ] = but t er ( nf , c ut o f f ) ;
f i l t d e n = f i l t f i l t ( b1 , a1 , den ) ;
i nt e r de n = interp1 ( t , f i l t de n , t i t o r ) ;
t end = length( i t o r f l t a y ) ;
86
j n = zeros ( 1 , t end ) ;
% t h i s part c a l c u l a t e s j /n , s e t t i ng j /n = 0 i f t he de ns i t y i s l ow
for j = 1: t end
i f i nt e r de n ( j ) > 8e18 ;
j n ( j ) = ( i t o r f l t a y ( j ) / . 2 ) . / i nt e r de n ( j ) ;
el se
j n ( j ) = 0;
end
end
j n max abs = max( abs ( j n ) ) ;
jn max = max( j n ) ;
[ i max , t i max ] = max( i t o r f l t a y ) ;
j n i max = j n ( t i max ) ;
max den = max( den ) ;
max f i l t de n = max( f i l t d e n ) ;
% t h i s part c a l c u l a t e s t he average de ns i t y i n t he 2nd h a l f of t he s hot
% l ook i ng at de ns i t y bet ween 4. 2 ms and 7. 2 ms
t s = 0. 0042; % new s t a r t ti me
t e= 0. 0072; % new end ti me
[ aa , I s ] = min( ( tt s ) . 2 ) ; % f i nd t he poi nt near es t t he s t a r t ti me
[ bb , I e ] = min( ( tt e ) . 2 ) ; % f i nd t he poi nt near es t t he end ti me
den sum = sum( den( I s : I e ) ) ;
den ave = den sum/( I e I s + 1 ) ;
disp ( [ Max Densi ty : num2str( max den1e 19, 3) 1019 m3 ] ) ;
disp ( [ Max Fi l t e r e d n : num2str( max f i l t de n 1e 19, 3) 1019 m3 ] ) ;
disp ( [ Max Current : num2str( i max /1000 , 3) kA ] ) ;
disp ( [ Max j /n : num2str( jn max , 3) Am ] ) ;
disp ( [ j /n at max n : num2str( j n i max , 3) Am ] ) ;
disp ( [ 2nd ha l f n ave : num2str( den ave 1e 19, 3) 1019 m3 ] ) ;
fi gure ( 1 ) ;
c l f ;
plot ( t i t o r 1e3 , jn , g , LineWidth , 2 ) ;
hold on ;
t i t l e ( [ j /n f o r shot num2str( shot ) ] , FontSi ze , 14) ;
xlabel ( Time [ ms ] , FontSi ze , 12 , FontWeight , bol d ) ;
ylabel ( j /n [ Am] , FontSi ze , 12 , FontWeight , bol d ) ;
grid ;
fi gure ( gcf ) ;
87
fi gure ( 2 ) ;
c l f ;
plot ( t i t o r , i nt er den , b , LineWidth , 2 ) ;
hold on ;
grid ;
% wr i t e t he dat a out t o a f i l e
wr i t e dat a = [ shot max den max f i l t de n i max jn max j n max abs . . .
j n i max den ave ] ;
wr i t e f i l e = n ;
wr i t e f i l e i n = input ( [ Al l done . Do you want to save data to . . .
s : \\ bvi c t or \\FIRdata\\ ? [ y/n ] ] , s ) ;
% al l ows s e l e c t i o n of t he row t o wr i t e t o
row = j n i n i ( 2 ) ;
row i n = input ( [ What row? Def aul t : [ i nt2str ( row) ] ] ) ;
i f ( row i n ) ;
row = row i n ;
end;
i f ( wr i t e f i l e i n )
wr i t e f i l e = wr i t e f i l e i n ;
end;
i f ( strcmp( wr i t e f i l e , y ) )
f i l e o u t = s : \ FIRdata\ j n peak ave n \ j n den . xl s ;
xl s wr i t e ( f i l e o u t , wr i t e dat a , j n and den , [ A i nt2str ( row ) ] ) ;
disp( Data was wr i t t en to f i l e . ) ;
end;
i f ( strcmp( wr i t e f i l e , n ) )
disp( Data was NOT wr i t t en to f i l e . ) ;
end;
% Update t he i ni f i l e
next s hot = shot + 1;
next row = row +1;
save j n i n i . dat next s hot next row a s c i i ;

También podría gustarte