Comparison of Edge Turbulence Velocity Analysis Techniques using Gas Puff Imaging Data on Alcator C-Mod by Jennifer Marie Sierchio B.S., University of Arizona (2011) Submitted to the Department of Physics in partial fulfillment of the requirements for the degree of Master of Science in Physics MAACHUSETTS INGT at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY OF TECHNOLOGy JUL 0 1 2014 LIBRARIES June 2014 @ Jennifer Marie Sierchio, MMXIV. All rights reserved. The author hereby grants to MIT permission to reproduce and to distribute publicly paper and electronic copies of this thesis document in whole or in part in any medium now known or hereafter created. Author ........... Signature redacted.. / , Certified by ZI I Department of Physics 1-1 May 9 2014 ...... Signature redacted................ James L. Terry Principal Research Scientist, Plasma Science and Fusion Center Thesis Supervisor CerifedbySig .. . ..... ... . . . .. Certified byNS. 9 0 Earl S. Marmar and Fusion Center Science Projegt, Plasn/, Division Head, Alcator Thesis Supervisor Accepted by .. Krishna Rajagopal Professor of Physics, Associate Department Head for Education nature red acted- Signature redacted E Comparison of Edge Turbulence Velocity Analysis Techniques using Gas Puff Imaging Data on Alcator C-Mod by Jennifer Marie Sierchio Submitted to the Department of Physics on May 9, 2014, in partial fulfillment of the requirements for the degree of Master of Science in Physics Abstract In the past, two methods for analyzing data from the Gas Puff Imaging diagnostic on Alcator C-Mod have been used. One uses temporal and spatial Fourier analysis to obtain wavenumber-frequency spectra, from which a phase velocity is computed 11, 2]. The other is based on time-delay cross-correlation of successive images used to track the motion of discrete emission structures 13, 41. Several Gas-Puff-Imaging experiments were conducted to obtain data taken using the GPI Phantom Camera. The analysis of and results from these data are discussed in 131. The results showed that the tracking time-delay-estimation technique found poloidal velocity magnitudes in the 0.1-1.4 km/sec range. However, independent examination of these data using the Fourier analysis yielded magnitudes up to a factor of 10 larger for the same data, and sometimes even disagreed with the direction of motion found. To understand the reasons for these discrepancies, we designed and generated synthetic data that mimics the real data. The user inputs the velocities, sizes, intensities, and distributions of the synthetic emission structures. We have used the synthetic data to test each code rigorously for strengths, weaknesses, and weighting. We have found that the Fourier analysis perfectly returns the correct poloidal velocity when there is no radial velocity component present. We have found that the tracking TDE analysis weights low frequency, low wavenumber features most heavily since they are typically the most intense, but systematically returns a smaller velocity than expected due to issues associated with averaging. After ad.justing for these issues, the tracking TDE code now returns the correct value of the poloidal and radial velocities to within 10% for synthetic data as long as there is only one velocity present in the synthetic simulation. We applied these corrections to the analysis of the real data, and found that the measurements changed little in most cases. We then examined, in detail, the Fourier-analysis-derived "conditional" spectra for each shot, and determined that the likely causes for the discrepancies are due either to multiple velocities with emission structures moving in opposite directions in the same field of view or to non-zero "dispersion" in which lower-frequency/lower-wavenumber features are moving with one phase velocity and higher-frequency/higher-wavenumber features are moving with a different phase velocity. In a couple of cases, there may be a radial component in the actual images that may affect the poloidal velocity measurement for the Fourier analysis. Accounting for these explanations, we believe that we have resolved the discrepancies in many cases, and can explain it in the others. Thesis Supervisor: James L. Terry Title: Principal Research Scientist, Alcator C-Mod, MIT Thesis Supervisor: Earl S. Marmar Title: Senior Research Scientist, Department of Physics, MIT Thesis Reader: Miklos Porkolab Title: Professor of Physics, MIT Acknowledgments First and foremost, I would like to thank Jim Terry for being my supervisor these past few years. His guidance, patience, support, as well as his expertise on GPI and edge turbulence have greatly helped me in this thesis work. Next I wish to thank Earl Marmar for being my formal advisor in the physics department, for his leadership of Alcator C-Mod during the past couple of years, and for his comments and suggestions which improved this thesis. Third, Miklos Porkolab deserves much gratitude for being my thesis reader as well as being my academic advisor. His guidance and support have proven invaluable. Fourth, I would like to thank Anne White for all of her help and comments which improved this work. Jim and Anne also deserve tremendous gratitude for the help and support they have given me during my time in the physics department, and for their guidance as I make the transition into a new program here at MIT. My classmates: John, Ian, Mark, Leigh Ann, Jude, Evan, Silvia, Chuteng, Dan, and Juan - you guys are awesome. Thank you for the good times, especially when the situation with C-Mod seemed really dire. My fellow ARCers: Dennis Whyte, Paul Bonoli, Brandon, Justin, Tim, Chris, Franco - while ARC is not the focus of this thesis, you all still deserve acknowledgment here. I have thoroughly enjoyed working with you all on the ARC design, and am genuinely sad that we cannot do more with it. To my family thank you for constantly loving and supporting me all these years (even though I'm 2500 miles away), making me laugh, and helping me to keep things in perspective. To Adam - thank you for every single second I get to spend with you, and for being incredibly understanding during the time I worked on this thesis. This thesis work was partially supported by a National Science Foundation Graduate Research Fellowship, under grant No. FC02-99ER54512 and DE-AC02-09CH11466. 1122374, and by USDoE awards DE- 6 Contents 1 Introduction 1.1 Fusion energy and tokamaks . . . . . . . . . . . . . . . . . . . . . . . 21 1.2 Turbulence at the edge of tokamak plasmas . . . . . . . . . . . . . . . 24 1.3 Gas-Puff-Imaging (GPI) hardware on Alcator C-Mod and detectors . 25 1.4 2 3 21 1.3.1 Avalanche photodiodes (APDs) . . . . . . . . . . . . . . . . . 27 1.3.2 Phantom Camera . . . . . . . . . . . . . . . . . . . . . . . . . 30 Organization of this thesis . . . . . . . . . . . . . . . . . . . . . . . . 30 Motivation 33 2.1 Comparison of two methods on recent C-Mod shots . . . . . . . . . . 34 2.2 A preliminary discussion of the observed discrepancies . . . . . . . . . 36 Fourier analysis of time-series images as a means of determining poloidal phase velocity 39 3.1 Fourier representation of time series and the discrete Fourier transform 40 3.2 The discrete Fourier spatial transform . . . . . . . . . . . . . . . . . . 42 3.3 Calculating the average signal in time, frequency, and wavenumber 3.4 dom ains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.3.1 Time dom ain . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.3.2 Frequency domain . . . . . . . . . . . . . . . . . . . . . . . . 46 3.3.3 Wavenumber-frequency domain . . . . . . . . . . . . . . . . . 46 Root-mean-square (RMS) value of the signal . . . . . . . . . . . . . . 46 . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 3.4.1 Time domain 7 3.4.2 Frequency Domain . . . . . . . . . . . . . . . . . . . . . . . . 47 3.4.3 Wavenumber-frequency domain . . . . . . . . . . . . . . . . . 47 Computation of fluctuations . . . . . . . . . . . . . . . . . . . . . . . 48 3.5.1 Epochs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 3.5.2 Oversampling the spatial Fourier transform . . . . . . . . . . . 49 3.5.3 Norm alization . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 3.6 Conditional wavenumber-frequency spectrum . . . . . . . . . . . . . . 50 3.7 Velocity measurements with the Fourier technique . . . . . . . . . . . 52 3.8 Comparison of oversampled Fourier technique with the two-point method 53 3.9 Comparison of results between GPI Phantom Camera and APDs . . . 55 3.10 Limitations of the Fourier method . . . . . . . . . . . . . . . . . . . . 56 3.5 4 5 6 Tracking time-delay estimation technique for determining structure velocities in time-series images 59 4.1 Cross-correlation function . . . . . . . . . . . . . . . . . . . . . . . . 59 4.2 Im plementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 4.3 Known limitations of this method . . . . . . . . . . . . . . . . . . . . 63 Generation and use of synthetic data for testing analysis techniques 65 5.1 Generation of synthetic data . . . . . . . . . . . . . . . . . . . . . . . 65 5.2 Comparison of synthetic data to real data . . . . . . . . . . . . . . . 67 5.3 Sample analysis on single-field and two-field shots . . . . . . . . . . . 69 5.3.1 Sample Fourier analysis . . . . . . . . . . . . . . . . . . . . . 69 5.3.2 Sample tracking TDE analysis . . . . . . . . . . . . . . . . . . 70 Modifications needed for use of Fourier and tracking TDE techniques 73 6.1 Issues found when applying the Fourier analysis . . . . . . . . . . . . 73 6.1.1 Vertical velocity error when radial velocity is not small . . . . 73 6.1.2 Wavefront model to explain the observations from the Fourier analysis applied in only one spatial dimension 8 . . . . . . . . . 74 6.2 7 Issues found when applying the Tracking TDE analysis . . . . . . . . 77 6.2.1 Effect of search box size on velocity measurement . . . . . . . 78 6.2.2 Requirement that there be at least four velocities lags in the average . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 6.3 Effect of adding noise to the synthetic data . . . . . . . . . . . . . . . 81 6.4 Corrections to tracking TDE code, applied to real data . . . . . . . . 82 6.5 Corrections to Fourier analysis, applied to real data . . . . . . . . . . 83 Resolution of the velocity discrepancies 89 7.1 Revisiting the original problem and where we are so far . . . . . . . . 89 7.2 Analysis for dispersion in the real data . . . . . . . . . . . . . . . . . 91 7.3 Analysis for the effects of multiple lobes within the field of view . . . 95 7.4 A resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 7.5 Summary and conclusion . . . . . . . . . . . . . . . . . . . . . . . . . 105 109 A Codes to generate synthetic data 9 10 List of Figures 1-1 Schematic of the coils generating the toroidal and poloidal magnetic fields. Graphic from CEA.15] . . . . . . . . . . . . . . . . . . . . . . . 1-2 22 Tokamak cross-section with minor (r)and major (R) radial directions, and poloidal (0) and toroidal (#) angles labeled. The central axis is the vertical line down the middle. The major radius, RO, goes from the central axis to the center of the plasma. 1-3 . . . . . . . . . . . . . . 23 Image of a turbulence blob structure as seen with Alcator C-Mod's gas puff imaging diagnostic. The separatrix is labeled as the dashed line. The view is approximately along the local magnetic field. Since the parallel wavelength of the turbulence is quite long, these images actually show a cross-section of a blob filament. . . . . . . . . . . . . 1-4 Diagram showing location of gas puffs and detectors in Alcator C-Mod. 1-5 Diagram illustrating how the gas puff line emission signal is transferred 25 27 from a telescope inside the vacuum vessel to the inner-wall APD detection system. The outer-wall viewing APDs as well as the Phantom Camera (see below) work in a similar manner. . . . . . . . . . . . . . 1-6 28 Inner-wall APD electronic noise, measured with no light on the detectors. The measurements are from detectors whose fibers were coupled to six radial views, hence the x-axis label. Typical signal-to-(electronic) noise ratios range from ~50 (for views deepest into the plasma) to > 100 for other views.16] . . . . . . . . . . . . . . . . . . . . . . . . . . 11 29 1-7 Power spectrum (square of the Fourier amplitude) per unit frequency interval for C-Mod shots #1121002022 (plasma) and #1121002024 (no plasma), as measured by the inner-wall APD system. The electronic noise floor (measured on a shot for which there was no plasma light present) is shown as the bottom trace. Both signals are normalized to the DC component of the plasma signal. 2-1 . . . . . . . . . . . . . . . . Vertical velocity vs. rho for four Alcator C-Mod shots for the two analysis techniques. The red upright triangles are results using the 29 Fourier analysis, while the blue inverted triangles are the results using tracking TDE. For the Fourier analysis, larger triangles indicate the dominant velocity measurement at that location. The discrepancies between the results from the Fourier analysis and the tracking TDE can be as large as an order of magnitude. In some cases, they do not predict the same direction. . . . . . . . . . . . . . . . . . . . . . . . . 3-1 35 Sample Phantom Camera frame showing the pixels included in one poloidal transform. Most columns in the poloidal direction are nearly vertical, and replace the simple column transform in Fourier analysis. 3-2 Wavenumber-frequency spectrum for C-Mod shot #1120815030, 44 p = 1.95 cm. The color scale is the log of the spectral power (the spectral density squared). 3-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Conditional spectrum for C-Mod shot #1120815030, at p = 1.95 cm. (a) using the oversampled method with the oversampling factor = 4, and (b) using the two-point method. The oversampled method found a (hand-fitted) velocity of 3 km/s and a velocity using the max-integralcomputation of 3.13 km/s, while the two-point method failed to produce a spectrum clear enough to make a measurement. 3-4 . . . . . . . . 52 Conditional wavenumber-frequency spectrum for C-Mod shot #1120712027, with hand-fit velocities shown. (a) Phantom Camera, (b) APDs. . . . 12 56 3-5 Conditional wavenumber-frequency spectrum for C-Mod shot (top) Phantom Camera, and (bottom) APDs. 3-6 #1120224009. . . . . . . . . . . . . . 57 Conditional spectra for shot #1110121019. The top plots use data from the Phantom Camera, while the bottom plots use data from the APDs. Results for each system are shown for two radial locations (p ~ -0.9 cm and ~0.09 cm). Qualitatively, the Phantom Camera and APDs detected the same features. However, there are differences in the poloidal wavenumbers for the features, which lead to the inference of different velocity measurements. A cross-comparison of the Phantom-derived and APD-derived feature velocities for one of the shots of Figure 2-1 is shown in Chapter 7 (as Figure 7-11). Generally the agreement is w ithin 20% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 58 Illustration of reference pixel inside its search box for the tracking TDE analysis. Here, the peak of the cross-correlation function is found within the box[7]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 62 Example of a velocity map for 4ms of C-Mod data, with axis labels representing pixel number. Velocity computations were attempted for 1/9 of the pixels in the frame. The maximum velocity in the field is 0.574 km /s. 5-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example of synthetic blob field with noise added. single blob is indicated by the arrow. 5-2 63 The motion of a . . . . . . . . . . . . . . . . . . 67 Example signal in a time for a pixel viewing the plasma scrape-off-layer (a), and example of a synthetic signal (b). Note that the time duration shown for each is the same, i.e. 5 ms. . . . . . . . . . . . . . . . . . . 5-3 68 Normalized (to total fluctuations in signal) PDF for a real shot (left) from a pixel viewing the far scrape-off-layer, and for a synthetic trial where gamma=n9 (right). . . . . . . . . . . . . . . . . . . . . . . . . . 13 69 5-4 (left) Spectrogram of the log of the spectral power (Fourier amplitude squared) as a function of poloidal wavenumber and frequency for a single-velocity field. (right) Conditional spectrum for the same single-velocity field. Input vertical velocity = 1.01 km/sec and input horizontal velocity = 0.0 km/sec. The red line through the lobe of the conditional spectrum indicates a phase velocity of 1.0 km/sec, i.e. it reproduces the input vertical velocity. The errors in the measurements are ~5% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5 Same as in Figure 5.4, but for a two-velocity field. 69 Input vertical velocities were 0.39 km/s and 1.56 km/s, and input horizontal velocities were 0.08 km/s and 0.39 km/s. The lines through the lobes indicate that the Fourier analysis nearly reproduced the input vertical velocities. Errors on the measurements are approximately 5%. Reasons for not exactly reproducing the velocities will be explained in Chapter 6. 5-6 . . 70 Velocity maps for single-velocity (left), and double-velocity (right) shots. Axes are both in pixels, with the view as it actually is in the machine. (left) Input vertical velocity = 1.01 km/s and input horizontal velocity = 0 km/s, and the analysis yielded a vertical velocity of 0.8 km/s and a horizontal velocity of 0.02 km/s. (right) Input vertical velocities = 0.39 km/s and 1.56 km/s and input horizontal velocities = 0.08 km/s and 0.39 km/s, while the analysis yielded a vertical velocity of 0.42 km/s and a horizontal velocity of 0.04 km/s. Errors were approximately 5% for each measurement. 6-1 . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Ratio of output to input vertical velocity vs. ratio of input horizontal to input vertical velocity for a series of synthetic shots. The blue dashed line indicates what the output should have been based on the input velocities. 6-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Wavefront model with angle a shown. . . . . . . . . . . . . . . . . . . 75 14 6-3 Wavefront prediction for the output vertical Z velocity for the Fourier analysis. The model prediction (Equation 6.3) is the green dashed line; the synthetic shots are shown with error bars. . . . . . . . . . . . . . 6-4 For tracking TDE analysis: (a) Output poloidal velocity vs. 76 input poloidal velocity, (b) Output radial velocity vs. input radial velocity. Both outputs are systematically smaller than the actual structure velocities, indicating that there are issues with the TDE method that 78 need to be understood................................. 6-5 Output poloidal velocity for tracking TDE vs. search box size in pixels. The input (actual) poloidal velocity was 2.0 km/s. . . . . . . . . . . . 6-6 78 Cross-correlation function for a reference pixel, contoured for time lags of -10 frames (upper left corner) through +10 frames (bottom right corner), not including zero lag. The search box size is 17x17 pixels, while the blobs have a FWHM of ~8 pixels. A well-defined peak in the function that meets the threshold. is only in the search box for four lags, yet the average velocity is calculated using values for 10 lags, as listed in 6.1. The scale reflects the value of the cross-correlation with the reference pixel for the given lag. . . . . . . . . . . . . . . . . . . . 6-7 79 Wavenumber-frequency spectrograms from the Fourier analysis for Elight/Enoise - 2.2 at the breakdown level for the tracking TDE (a), and (b) the conditional spectrum where a faint feature is still available for which a valid velocity is obtained using the Fourier analysis. Eight/Eoise in this case is 0.87. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8 Radial conditional spectra for varying input Vz/VR. (b) Vz/VR = 2. (c) Vz/V (a) Vz/VR = 1. = 5. (d) Vz/VR = 8. (e) VZ/VR = infinite. 15 82 84 6-9 Examples of spreads in lobes of poloidal conditional spectra for real shots in the far scrape-off-layer (p > 0.85 cm). (top) Two lobes on opposite sides of the k-spectrum. The separation of the two lobes is much too wide compared to the synthetic spectra where the separation is due to a significant component in the perpendicular direction. (bottom) Spread in lobes (one dominant direction) which indicates that there may be a radial component for this shot. However, very few real shots had significant width to the lobes in their poloidal spectra, indicating small radial components. . . . . . . . . . . . . . . . . . . . 6-10 Sample radial conditional spectrum for shot #1120224009. 7-1 . . . . . . 85 87 Poloidal velocity measurements for four Alcator C-Mod shots, using Fourier analysis (red triangles) and tracking TDE (blue inverted trian- gles). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2 90 Sample wavenumber-frequency spectrogram for a real shot (a) and a synthetic one-velocity shot (b). The color scale indicates the log of the power (square of the absolute value of the Fourier coefficients) at a given wavenumber and frequency. . . . . . . . . . . . . . . . . . . . 7-3 Poloidal conditional spectrum for C-Mod shot #1120224015. 92 The spec- trum features a curved lobe indicating some dispersion in the plasma at p = -0.65 cm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4 (a) Conditional spectrum for Shot #1120224024, 93 p = -0.1 cm. An abrupt break in slope is clearly observed. Two slopes are shown: one for a slower-moving component, and one for a fast moving component. (b) Conditional spectrum for Shot #1120224009, p = 1.0 cm, also showing a clear break in slope, slower phase velocity (-0.6 km/s) for the lower frequency/lower k features and a faster phase velocity (-3 km/s) for the higher frequency features. The solid white line is the velocity obtained from maximum-in-the-integral-computation. .... 16 93 7-5 Conditional spectra for synthetic shots constructed in order to show a break in slope. The red dashed line is the hand fit for frequencies < 30 kHz and yields a velocity of -0.75 km/s. The dark green line indicates the slope of the slower-moving feature (with a phase velocity ~ = -0.75 km/s) while the lighter green dashed line indicates the slope of the faster-moving feature (-1.15 km s). Input values for these shots are given in Table 7.1. (a) Uses only two fields, and (b) uses four fields. 7-6 94 Poloidal conditional spectra for four-field (a) and three-field (b and c) synthetic shots. The negative-k lobes appear blended. Both a maximum-integral computational fit (solid white line with the Vl value) and hand fits (dashed red lines) were completed for these cases, and are consistent with the input values given in Table 7.2, although only 3 of the 4 velocities of four-field case are resolved. . . . . . . . . 96 at p=-0.72 . . . . . . . . 98 7-7 Conditional spectrum for shot #1120224027, 7-8 Figures 2-1 and 7-1 modified after considering the presence of multiple flows and non-zero dispersion. Again the blue triangles are using the tracking TDE after applying the corrections discussed in Chapter 6. The larger red triangles are the velocities from the Fourier analysis that were hand-fitted to the lower frequency/lower k parts of the dominant lobes in the conditional spectra. The smaller triangles are the handfitted velocities for lobes in the conditional spectra that were present but not dominant or were present at the higher frequencies . . . . . . 7-9 Poloidal conditional spectra for shot // 1120224009. 99 Shown for each point in Figure 7-8a are fits to the lobes in the spectra. (a-c) have two lobes in the opposite directions while (d,e) have non-zero dispersion (a slower-moving component at low k, low f with a faster component at higher k and f). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 17 7-10 Poloidal conditional spectra for shot #1120224015. Shown for each point in Figure 7-8b are fits to the lobes in the spectra. Hand fits to the velocity for f <30 kHz are shown in red, while a computational fit is shown in white. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 7-11 Poloidal conditional spectra for shot #1120712027. . . . . . . . . . . 103 7-12 Poloidal conditional spectra for shot #1120815018. . . . . . . . . . . 104 7-13 Poloidal velocity vs. p for C-Mod shot ,if1120815018, comparing the data from the APDs (blue) to the data from the Phantom Camera (red), using the Fourier technique, as the tracking TDE code is not designed for use with the APDs. The meaning of the small and large triangles is the same as described in Figure 7-8. These measurements are generally in agreement. . . . . . . . . . . . . . . . . . . . . . . . . 18 105 List of Tables 1.1 Typical values for key parameters for the Alcator C-Mod tokamak.18] 6.1 Lags (measured in ps) used for computation of poloidal and radial ve- 26 locities for a reference pixel in tracking TDE, for a synthetic shot with a purely vertical input velocity (1 km/s), and the change in pixels Ai and Aj for the horizontal and vertical directions, respectively. Only lags whose maximum cross-correlations meet the 0.5 threshold are included in this table. After conversion from pixels/lag to km/s, the output poloidal velocity for this shot was 0.82 km/s; the output radial velocity was -0.1 km/s. . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 80 Results for same synthetic shot after requiring that the pixel at which a maximum in the cross-correlation occurs be located in the search box. Only four lags are used in the average. The new output poloidal velocity for this shot was 0.93 km /s; the new output radial velocity was -0.1 km /s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 Original 80 13] (black entries) and new (bold entries) values of poloidal velocity as computed with the tracking TDE analysis after applying the improvements suggested in this chapter (km/s). For the data in these shots, no measurements changed directions. A few points are not given because the data at those locations were too noisy to yield a m easurem ent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 83 6.4 Original [31 (black entries) and new (bold entries) values of radial velocity as computed with the tracking TDE analysis after applying the improvements (km/s). For the data in these shots, no measurements changed directions. A few points are not given because the data at those locations were too noisy to yield a measurement. 7.1 . . . . . . . . 83 Input values for two synthetic shots which show breaks in slope. Velocities are given in km/s, FWHM are given in cm, and max intensity in arbitrary units. The TDE analysis returns poloidal velocities of -0.51 km/s and -0.61 km/s respectively for these synthetic cases, obviously weighting the lower-frequency components more heavily than the higher ones. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 95 Input parameters for three multi-field synthetic shots. Velocities are measured in km/s, FWHM in cm, and intensity in arbitrary units. The input velocities are to be compared with the features and fits in the conditional spectra of Figure 7.6 and the tracking TDE velocities listed in Table 7.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3 96 Fourier and tracking TDE results for the synthetic shots given in Table 7.2. All velocities are in km/s. . . . . . . . . . . . . . . . . . . . . . . 20 97 Chapter 1 Introduction This chapter will cover some topics important for the rest of the thesis. In the first section, we will discuss the overall motivation for studying fusion, and describe the main device we use in those studies as well as the typical geometry we work in. The second section will introduce the reader to plasma turbulence and its characteristics. The third section will describe one of the diagnostics we use to study plasma turbulence, as well as the source of all data for this work. And the fourth section will set up the organization of the rest of the thesis. 1.1 Fusion energy and tokamaks One of the major problems facing humanity today is to find an energy source which is clean, efficient, renewable, and affordable. The current energy sources (fossil fuels, wind, solar, nuclear fission) have their own set of advantages and disadvantages. However in the 1930s it was discovered that stars, such as our Sun, have an internal energy source completely different from anything currently used on Earth. Since then, scientists have endeavored for almost 60 years to generate electricity here using the same mechanism that allows the Sun to shine: thermonuclear fusion. Fusion occurs when two lighter atoms "fuse" into a heavier atom which is lighter than the sum of the original two. Because of this mass defect between the reactants and the product, (kinetic) energy is released. The fusion of atoms requires extremely 21 high temperatures, on the order of tens of millions Kelvin at a minimum for hydrogen. At these temperatures, the atoms are completely ionized, with the electrons normally in the atoms no longer bound by the Coulombic attraction of their respective nuclei. These free nuclei (ions) and electrons form what is called a plasma.[9, 101 In our Sun, this plasma is confined by gravity; unfortunately on Earth we do not have the mass to confine a plasma gravitationally so we must find other means of confining a plasma. One way to confine plasmas is by using magnetic fields, since charged particles gyrate around the field lines as they make their way around the torus.191 As one might expect, not all configurations of magnetic field lines will successfully confine the plasma. The most successful configuration, a shaped torus called a tokamak, has magnetic fields both in the toroidal and poloidal directions, as shown in Figure 1-1. We define the toroidal direction to be around the torus the long way; this direction Primary winding of the transformer Magnetic field created by plasma current Toroidal Plasma current Resultant helical magnetic field magnetic field Figure 1-1: Schematic of the coils generating the toroidal and poloidal magnetic fields. Graphic from CEA.[51 circles around the device, when viewing the device from above. The poloidal direction is the direction around the torus the short way (if we were to look at a cross section of 22 the torus, not as viewed from above but sideways, the poloidal direction would follow the lines forming the cross section on one side of the torus). This forms a cross-section as shown in Figure 1-2. Notice that the poloidal cross-sections need not be circular, and often have a soft D shape. The poloidal field itself is created primarily by the plasma current (with additional coils for shaping and stability), while the toroidal field is created by coils outside the vacuum vessel holding the plasma. Looking at the cross-section, the center of the plasma is located at a radius we define to be the major radius RO, if we are measuring from the central axis. We can also define a minor radius to be half the maximum horizontal length of the poloidal cross-section. two angles # So overall, this geometry defines two radial directions, R and r, and and 0. The radius of the tokamak at the outboard (outer) side is R r Figure 1-2: Tokamak cross-section with minor (r)and major (R) radial directions, and poloidal (0) and toroidal (#) angles labeled. The central axis is the vertical line down the middle. The major radius, RO, goes from the central axis to the center of the plasma. greater, by definition, than it is on the inboard (inner) side. Drawing a horizontal line from the central axis of the torus through the center of the plasma extending to the outboard side, and then rotating it around the central axis defines what is known as the midplane. Even though the plasma is well-confined by the magnetic field configuration, the 23 confinement is not perfect, and it is crucial that the region of direct interaction between the plasma and the material surfaces that face it be moved further away from the main plasma. The most common way to accomplish this is to use a divertor configuration, which splits the plasma into two regions: one with closed nested poloidal field lines, and one with open poloidal field lines. These open lines intersect the vacuum vessel, usually at the divertor plates (see Figure 1-4 where the divertor plates are located at the bottom of the vacuum vessel). The poloidal field exactly cancels out at a location called the X-point. The flux surface that contains the X-point is called the separatrix, or last-closed flux surface (LCFS). Outside the separatrix is the region of open field lines, called the scrape-off layer (SOL). The scrape-off layer is cooler than the core plasma, and is the region we will focus on in this thesis. 1.2 Turbulence at the edge of tokamak plasmas Turbulence is one the major issues currently preventing the realization of fusion as a viable energy source. It is the primary reason for plasma transport across the confining plasma (loss of plasma heat and particles, and thus poor plasma confinement).[111 Because this is such an important problem, we are interested in all properties of the turbulent structures in the plasma: their dynamics (momentum), their fluctuation magnitudes, how they perturb the plasma density and temperature profiles, and their size/length scales. This thesis will be concerned most with the velocity and size scales of the turbulent structures in the plasma boundary region near and outside the separatrix, the largest and brightest of which are colloquially referred to as blobs. Below is an image taken with the gas puff imaging diagnostic (see below for description) of one such blob structure (Figure 1-3) These large and relatively bright turbulent structures have been measured to be around 0.5 cm to 1 cm in diameter,[12] and are characterized by having a higher density than the rest of the plasma. The magnitudes of the light intensity fluctuations, which are responding primarily to the plasma density fluctuations, vary from being normally distributed inside the separatrix (the "edge" region) to being gamma- 24 (.-in)Radial Direction (out-.) Figure 1-3: Image of a turbulence blob structure as seen with Alcator C-Mod's gas puff imaging diagnostic. The separatrix is labeled as the dashed line. The view is approximately along the local magnetic field. Since the parallel wavelength of the turbulence is quite long, these images actually show a cross-section of a blob filament. distributed in the far scrape-off layer.[13] The wavelength of the turbulence parallel to the toroidal magnetic field is quite long, forming filaments along the field lines. 114, 15] What is actually being measured in the GPI images are cross-sections of the turbulent structures, perpendicular to the toroidal field. These cross-sections need not be circular. Rather, away from the outboard midplane (poloidally), they are elliptical, with their ellipticity and angle of orientation varying depending on the location of measurement. 116] 1.3 Gas-Puff-Imaging (GPI) hardware on Alcator CMod and detectors Alcator C-Mod 18] is a currently operational tokamak located on MIT's campus. In Table 1.1, key parameters for C-Mod's plasmas as well as relevant dimensions are given. At a major radius of 0.68 m, it is one of the smaller of the major tokamaks in operation, but its magnetic field on axis can be as high as 8 T. 25 Parameter Major radius Minor radius Plasma current Toroidal magnetic field Density Central temperature Value for Alcator C-Mod 0.68 m 0.22 m ~1 MA up to 8 T 2 x 1019 - 8 x 1020 / m 3 -5 keV Table 1.1: Typical values for key parameters for the Alcator C-Mod tokamak.181 One of the diagnostics on C-Mod to measure properties of plasma turbulence is Gas Puff Imaging (GPI).117] The GPI system works by puffing a neutral gas such as deuterium or helium into the plasma. The neutrals are not constrained to follow the magnetic field lines, and they will emit line radiation from their interactions with the plasma. The light from the puffed-gas cloud is typically filtered so that only one emission line of the particular neutral is detected (D, at 656 nm or He-I at 587 nm). Figure 1-4 shows the arrangement in Alcator C-Mod of the two gas puffs, both located near the midplane, one on the inboard side and one on the outboard side. There are currently two different types of detectors used to detect the light signals: avalanche photodiodes (APDs) and a commercially-available fast-framing (400,000 frames/sec) Phantom Camera. The view of the Phantom Camera is aligned along the magnetic field, while the view of the APDs is aligned toroidally'. Each can measure the same quantity: the intensity of light signal received in each view or pixel. Since the light signal is dependent upon the neutral density as well as the local electron density and temperature (I ~ non'T ),[18, 191 only the normalized intensity fluctuation level I is useful for our purposes. With this parameterization, I is related to the normalized density and temperature fluctuations as derived in [1: I + = a <I> < n> __ where a and 13 __ < >(1.1) < T> are coefficients dependent on the type of gas puffed into the plasma, and I, ii, and t are the signal, density, and temperature fluctuations respectively. 'Not being perfectly aligned with the magnetic field (i.e. at an angle of ~ 80) should, in principle, result in only a 1% smearing of field-aligned structures as detected by the APD system. 26 2D an" ggTwo Inboard m =n gm-4. mpeaisnuo -A---s WnersW.r--4x4 Figure 1-4: Diagram showing location of gas puffs and detectors in Alcator C-Mod. We take the RMS value as a measure of the fluctuation. 1.3.1 Avalanche photodiodes (APDs) Arrays of APD detectors are used for detection of interference-filtered gas puff emission from both the inboard and the outboard side. Figure 1-5 shows schematically how the detector system is set up for the inboard side; the outboard side is set up in an analogous fashion.[11 There is an in-vessel telescope, which images the gas puff into 54 unbroken fibers. Each fiber sees a different location in space. The fibers are brought through the vacuum interface and run to a "breakout box" where each fiber can be accessed via an SMA termination. From the "breakout box" the fibers are run individually to SMA connectors that couple the light to individual APD detectors on a 4x8 detector array. The fibers are proximity coupled though a thin (2 mm) interference filter (D, or He I). The amplified detector outputs are digitized at 2 MHz. Each APD array coupler only allows for 30 views; thus only 30 of the 54 are currently used at any one time. The outboard side utilizes three APD arrays, with 30 views each for a total of 90 views. The inner and outer APD systems share a common water chiller, which cools the components to 15 C in order to keep the APD gain constant 27 and maintain a low noise level. Schematic of Innerwall Imaging System af 55 iOkhI ed "$MIA Figure 1-5: Diagram illustrating how the gas puff line emission signal is transferred from a telescope inside the vacuum vessel to the inner-wall APD detection system. The outer-wall viewing APIs as well as the Phantom Camera (see below) work in a similar manner. Each APD array is structured with two cathodes, each biased with a separate high-voltage. Each cathode connects to 16 detectors, 15 of which are illuminated with fibers viewing the gas puff, while one is kept dark and is used to monitor the dark current. Since each fiber is accurately registered to illuminate a given ARD detector, there is almost no cross-talk between the cathodes on a typical APD chip (0.3%). Each APD cathode is controlled by a remotely-programmed high voltage. At a high voltage of approximately 420V, a gain of 50 is achieved4[6j These detectors have very high quantum efficiency (QE > 0.8 at both wavelengths of interest), and when combined with their signal amplifiers, have very low electronic noise, as shown in Figure 1-6. To examine the typical signal-to-noise as a function of frequency for the inner-wall APDs, we show in Figure 1-7 power spectra (the square of the Fourier amplitude per unit frequency interval) for both a signal without plasma light and with plasma light normalized to the DC component of the plasma shot. As can be seen, 28 Z=-O.D679782 - Electronic Noise 0.0025 0.0020 - 0.0015 - 0.0010 - AA A C 0 0 6~ 44.5 45.0 46.5 46.0 45.5 Rodius (cm) Figure 1-6: Inner-wall APD electronic noise, measured with no light on the detectors. The measurements are from detectors whose fibers were coupled to six radial views, hence the x-axis label. Typical signal-to-(electronic) noise ratios range from ~50 (for views deepest into the plasma) to > 100 for other views.[6 the electronic level is below the signal at all frequencies. In this example, beyond about 300 kHz the noise is due to photon statistical noise. Shot 1121002022 (plasma) & 024 (no plasma) 10- p = 0.22+/-0.19cm Rmaj= 4 4 .90 cm N 106 V 10-7 3 10-8 0 2 no light noise floor a10-9i 10 100 10 100 Frequency (kHz) Figure 1-7: Power spectrum (square of the Fourier amplitude) per unit frequency interval for C-Mod shots #1121002022 (plasma) and #1121002024 (no plasma), as measured by the inner-wall APD system. The electronic noise floor (measured on a shot for which there was no plasma light present) is shown as the bottom trace. Both signals are normalized to the DC component of the plasma signal. 29 1.3.2 Phantom Camera The Phantom 710 Camera is a commercial fast-framing camera used to view the filtered line emission from the gas puff, from which we can study turbulence at the edge of the plasma. The 6 cm by 6 cm image of the gas puff is transferred to the camera through a coherent fiber bundle, and then re-imaged onto the camera's CCD detector, which has a 64x64 array of pixels. It has a maximum frame rate of 391,000 frames per second, thus a time per frame of approximately 2.5 pus, and a typical exposure time of 2.1 ps at this frame rate. The gas puff is centered ~3 cm below the midplane on the outboard side and roughly at the typical radial location of the LCFS; the viewing geometry is shown schematically in Figure 1-3. The gas-puff imaging and image transfer work in a similar fashion as those for the APDs: a telescope inside the vessel images the emission onto a coherent fiber optic bundle, which then brings the images to lenses which reimage the light through an interference-filter for line emission from deuterium or helium, and then onto a camera CCD. The actual chordal spatial resolution for the system estimated to be roughly 2-3 mm at the midplane.[3] The remainder of this thesis will focus primarily on data taken with the Phantom Camera, the reasons for which will be explained in Chapter 2. Since the Phantom Camera is less sensitive that the APD detector arrays, it has a lower signal-to-noise ratio than the APDs. In some cases, the data taken with the APDs for the same C-Mod shots will be used for verification purposes. 1.4 Organization of this thesis This thesis is organized as follows. Chapter 2 will describe the motivation for the rest of this work, discussing some recent published data and the analysis discrepancies discovered, and introduce the reader to our findings. Chapters 3 and 4 will go into detail about the two analysis techniques: Fourier analysis, and a time-delayestimation/pattern tracking hybrid, respectively. Chapter 5 will present how we chose to investigate the discrepancies found using the two analysis techniques, i.e. through the creation and use of synthetic data. Chapter 6 will explain some of the initial 30 issues encountered when using the analysis methods on the synthetic data, and offer modifications to the codes to mitigate these issues. And Chapter 7 will provide evidence that suggests a resolution to the discrepancies that motivate this work and will also conclude this thesis. 31 32 Chapter 2 Motivation As mentioned in Chapter 1, this thesis will focus on the velocities, size scales, and intensities of the emission fluctuations as measured by GPI. Therefore, we wish to understand how these quantities are measured given the data from the GPI diagnostic. Many methods for analyzing GPI data have been developed;[1, 2, 3, 4, 13, 20, 21] we will consider only two methods here: one using spatial and temporal Fourier analysis, and another using a hybrid between pattern tracking and time-delay estimation (TDE). The two methods will be discussed in detail, in Chapters 3 and 4, respectively, so only a brief description will be provided here. As mentioned previously, the GPI takes time signals for each pixel/view. This produces a three-dimensional set of data: two spatial dimensions and one temporal. The first analysis method,[1, 21 Fourier decomposition, involves both temporally and spatially Fourier transforming the time series of images to produce a wavenumberfrequency spectrum (defined in Chapter 3). Using this spectrum, a phase velocity of fluctuating emission structures can be easily obtained as 27rf /k, where f is the frequency and k is the wavenumber, as long as the Fourier amplitudes used are maximal for each frequency at a wavenumber such that f/k is approximately constant. Because the Fourier analysis decomposes the signal, it can detect multiple components moving at different phase velocities. The second method, tracking TDE,[3] involves detecting a maximum in the timedelayed cross-correlation function between time histories of signals from image pixels 33 (defined in Chapter 4) in some search box of pixels surrounding a reference pixel. This is completed for several time lags. Since it searches for maxima in the crosscorrelations, it favors bright, large features. If each cross-correlation function for the set of time lags meets a threshold, then a velocity is computed for that time lag as the distance between the location of the peak and the reference pixel divided by the time lag. If the threshold is met for more than one lag in the set, then the associated velocities are averaged. Thus, the tracking TDE analysis can only output one velocity for the region, rather than multiple velocities for multiple flows. It is important to note that the tracking TDE does not compute the phase velocity. 2.1 Comparison of two methods on recent C-Mod shots As will be investigated, each method has its strengths and weaknesses. Ideally, we would like to use one method to validate the other, and vice-versa to converge on a common estimate for the velocities of the emission structures. As a starting point, we present some recently published 13] GPI Phantom Camera results for a sampling of Alcator C-Mod shots from a specific implementation of the tracking TDE method, as well as the results from using an implementation of the Fourier analysis technique on the same data, as shown in Figure 2-11. The plots show the calculated vertical velocity (Z-direction) of the emission structures vs. p, where p is the distance outside the separatrix for view locations that have been mapped magnetically to the outboard midplane. Negative p indicates locations on closed field lines and flux surfaces, while positive p indicates we are looking at the scrape-off layer (p=O is the separatrix). The red upright triangles are the results from the Fourier analysis, while the blue inverted triangles are the results from the tracking TDE analysis. There are some instances in which the Fourier analysis outputted two results for the same location; this is due 1[3] actually has the locations in rho 1.0 cm greater than shown in the figure. This is due to the fact that during a vacuum break in 2011 the Phantom Camera alignment, but was only recently accounted for. The figures and data in this thesis reflect that recent correction. 34 to the fact that (as will be shown in Chapter 3), the Fourier analysis examines both directions (up and down) for feature propagation, and in many instances finds features propagating in each direction. Thus, both a positive and a negative velocity are assigned to the same p location. As shown in Figure 2-1, the Fourier analysis and the Shot #1120224009 Shot #1120224015 4 2 (b)A I (a) A A - A a E E V VV 0 V -1 A A -1 0 A -0 5 .A D5 A -2 - 0.0 Rho (Cm) 3 -05 0.0 Rho (cm) 1.0 D5 Shot #1120815018 4 & A A -1.0 -15 1.0 Shot #1120712027 4 A A -2 (d) -(0) 3 2 E E 2 A A A 1 a A AL AA -1 5 AA -V- -- -- -- -- -- -- --. V T -1 0 -0.5 Rho A A - D0 0.5 -1 (cm) 5 -1.0 -0.5 A A A 00 Rho (cm) 0.5 A 1.0 Figure 2-1: Vertical velocity vs. rho for four Alcator C-Mod shots for the two analysis techniques. The red upright triangles are results using the Fourier analysis, while the blue inverted triangles are the results using tracking TDE. For the Fourier analysis, larger triangles indicate the dominant velocity measurement at that location. The discrepancies between the results from the Fourier analysis and the tracking TDE can be as large as an order of magnitude. In some cases, they do not predict the same direction. tracking TDE output velocities do not agree. The computed velocities differ by up to an order of magnitude and even direction (if there is only one direction detected with the Fourier analysis). This poses serious issues with the published results using either method. First, this implies that neither method can be used to validate the other, and second, it is certainly possible that the results previously obtained with either code could be incorrect. The purpose of this thesis is to understand the reasons for 35 these differences, and make possible adjustments to the methods and implementations by which these results were obtained to allow for validation of future results. 2.2 A preliminary discussion of the observed discrepancies The first limitation in these measurements is due to the gas puff itself. Because a gas is being puffed into the plasma, and interacting with it to induce line emission, there is a risk that the puff perturbs the plasma to the point of affecting the measurement. Estimates have been made for this effect; it is predicted that the energy loss due to the puff should be small, but the particle increase due to the puff could be significant enough to change the density in the midplane scrape-off layer 13] and thus affect the intrinsic turbulence. However, this effect is difficult to quantify without other independent measurements. Its effect on the velocity measurements from these methods is also unknown, but is likely not significant. It can now be mentioned that both methods themselves have limitations for computing the velocities of the emission structures which could affect the outputs and need to be stated. First, since GPI cannot yield any information about the structures' motion in and out of the image plane, neither method can determine velocities parallel to the toroidal magnetic field. Second, if there is dispersion in the plasma, where the phase velocity mentioned above is not equal to the group velocity of the structures (f/k is not constant), then neither method will produce the correct measurement. Limitations for the individual methods will be discussed in Chapters 3 and 4. Most importantly, we mentioned above that the Fourier analysis can yield multiple measurements if there are multiple flows while the tracking TDE method cannot.131 As we will see in Chapter 7, this, in combination with dispersion that causes abrupt changes in the phase velocity as a function of wavenumber, ultimately plays a significant role in explaining the discrepancies. Multiple flows and dispersion are fairly common occurrences in the real data. Once we account for these reasons, along with 36 the fact that the tracking TDE favors bright features, we will be explain to explain most of the discrepancies and possibly recover them for some shots. 37 38 Chapter 3 Fourier analysis of time-series images as a means of determining poloidal phase velocity In this chapter, we describe in detail the first of the two methods for analyzing GPI data we wish to compare, the Fourier analysis method, as implemented by I. Cziegler.[1, 2J The general idea of this method is to temporally and spatially Fourier transform the time series from the images into a wavenumber-frequency spectrum, from which a phase velocity is derived. We will first describe the mathematics behind the Fourier method, as well as explain how to compute the fluctuation amplitudes. We then discuss the specific implementation of this method and how to compute the phase velocity from the conditional spectrum. We end by comparing our method to the well-known two-point method, and by comparing the Fourier-analyzed Phantom Camera data to the Fourier-analyzed APD data. 39 3.1 Fourier representation of time series and the discrete Fourier transform Let us begin by assuming we have obtained a signal in time from the GPI diagnostic. The GPI diagnostic measures fluctuations of visible line emission for He I or D, due to interaction of the plasma with the atoms from the local gas puff. We assume that we can represent the signal from a pixel in the Phantom Camera images as g(t). This signal g(t) will include a slow-variation component from the plasma background and gas puff as well as a fast-variation from density and temperature fluctuations. We can represent g(t) as a Fourier series [221 of period N, in which the signal exists for only one period and N is the total number of time-points (the total number of data points digitized from a single view of the plasma): 27rnt (an g(t) = ao + a, cos N n=1 27rnt + bn sin N N (3.1) where the Fourier amplitudes ao, an, and bn are obtained from Euler's formulas. We can manipulate the above to write g(t) as a cosine function only, with a phase shift: g(t) = ao + ancos /- N (3.2) n=1 where the coefficients and phase shifts are given by: 2+b2 tan On = (3.4) b Alternatively we can write g(t) as a complex series using another of Euler's formulas: 1231 00 Cn3 g(t) = ?=-00 40 ) (3.5) where cn is given by: 1231 0 2 Cn - 1 (an - ib,) 2 1 -(an + ib!.) 2 if n = 0, (3.6a) if n > 0, (3.6b) if n < 0 (3.6c) Inputting the equations for the coefficients back into the series representation of g(t) and changing variables leads to the Fourier integral transform representation of g(t). Of course, for our purposes, g(t) is not a continuous function; it is discrete with the intensity measured at a given set of times. We can write the complex coefficients, and hence the discrete frequency spectrum, as the following: N-1 gn = Nan = (- i l) (3.7) t=0 This transforms g(t) into and these coefficients tell us which frequencies dominate in the signal. The Fourier amplitudes for the sine/cosine or cosine-alone decomposition can be obtained from the complex Fourier transform coefficients: Cn + c*, (3.8) b- =c* - Crj (3.9) an a, = 2|cn 1 tan On - img(C) real(c,,) (3.10) (3.11) where we have taken advantage of the fact the g(t) is a real-valued function, so c-n = c*. If the signal arises from multiple independent processes then we can individually transform the functions representing each process. This arises from the fact that the integral of two separable functions is the sum of the integrals over each function individually. For example, we can use GPI to characterize the quasicoherent mode (QCM). GPI returns the total signal of the QCM and the broadband 41 background. In this case, the two processes can be separated and represented as different functions, g(t) = fQcM(t) +hBB(t), whose transform can be decomposed: 122] g 3.2 = fQcM + hBB (3.12) The discrete Fourier spatial transform The Fourier analysis technique we use calls for not only transforming in time, but in space as well for two-dimensional images. Thus, we will now describe what the general 2D spatial transformation looks like. It is important to note that while transforming in time gives frequency (in units of s-1), transforming in space will give, in principle, wavenumbers in both spatial directions (in units of cm- 1 ). If we have a two-dimensional image with coordinates r and z, the 2D spatial transformation is given by:1221 R-1 Z-1 H[kz, kR] = R 1 h[z, r]e-2i(R+ (3.13) ) r=O z=O where kR and kz are the wavenumbers in the r and z directions, respectively, and R and Z are the total number of spatial points, respectively. And the inverse transform is given by: R-1 Z-1 h[z, r] = RZ LH[kz, kRe R (3.14) z) r=O z=O The time-to-frequency transformation involves only one dimension. However, this involves two dimension and thus introduces subtleties when actually implementing this. We can think of the image as a matrix of values, and in performing the transform, we are operating on that matrix. To begin, we rewrite Equation 3.13 in a slightly different, but equivalent form: IRH[kR, kz] = RE 11 r=0 Z-1 zEh[z, -2 kZ r]e-2i z -,ik -2e R (3.15) z=0 First we perform a column transformation on the component in brackets. The summation is with respect to the row z, and column r is ignored. We can define the Z by 42 Z column transform operator, which will act on our image as a matrix multiplication from the left: 1 e-2 7r zk7 z (3.16) H' = Kh[z, r] (3.17) K = z and the column transformation is: Where the bold font indicates that K and H' are matrices operating on h. We define the R, by R row transformation operator which will act on our column-transformed image from the right, and will perform a summation over column r, leaving kz free: L= R Re2R (3.18) So our final result is the following: H[kz, kR] = Kh[z, r]L (3.19) To summarize, we have defined for a spatial 2D Fourier transform what the column and row transforms are. These will play a role in Chapter 6 when issues with this method will be discussed. There are two caveats to this formulation. First, because we are interested in the poloidal velocity rather than in the perfectly vertical one, the transform we perform are actually not perfectly vertical in space, but rather along flux surfaces of constant p (distance from separatrix). For the poloidal transform the differences from a simple transformation of pixels along adjacent vertical column pixels are shown in Figure 3-1. Second, in our particular implementation, only the poloidal transform is performed using the signals from pixels viewing along flux surfaces with a similar p coordinate, giving a wavenumber in the poloidal direction. We do not perform the radial transform using pixels viewing similar Z coordinates, and thus do not find a radial wavenumber. The magnetic flux surfaces are approximately parallel to the poloidal direction, and perpendicular to the radial direction. Thus for 43 the poloidal transform, the columns over which the process is completed are almost parallel to the magnetic flux surfaces, while the radial transform would attempt to complete the Fourier process over rows which are perpendicular to them. The transform in the radial dimension is problematic since the separatrix is typically in the field of view and radial propagation of turbulence inside and outside of the separatrix is observed to be quite different. 2 . . . . . . . i . . . 4 0 0E -2 -4- -61 84 86 R 88 (cm) 90 92 Figure 3-1: Sample Phantom Camera frame showing the pixels included in one poloidal transform. Most columns in the poloidal direction are nearly vertical, and replace the simple column transform in Fourier analysis. Since both the GPI APDs and the Phantom camera are two-dimensional arrays of views, we add a spatial dimension to the time-Fourier analysis. This adds important information about the spatial characteristics of the turbulence, which we would like to determine. We accomplish this by following the Fourier temporal transform (Equation 3.7) by a spatial Fourier transform that transforms the time/frequency analysis from multiple spatial points into frequency, wavenumber spectra 44 (f) -- (f,k). The frequency dependence remains intact while we have added a new dependence on wavenumber. Because the 2D spatial information is available, both the time series and the frequency spectrum are g(t) = g(,t), h(f) = (, f) (3.20) We perform the spatial transformation on the time-transformed coefficients from the appropriate set of views. Let us now rewrite the above formulation in a slightly different manner, allowing the user to choose the length of the poloidal wavenumber vector, rather than in typical Fourier analysis in which the length of the wavenumber vector is the same as the number of spatial points. Because the spatial locations of the signals and wavenumbers are vectors, we use the tensor and outer product operators to perform the spatial transforms. In general, the spatially transformed spectrum is given the equivalent of Equation 3.17: g(k, f) = C( , k) O® j(2, f) (3.21) where 9t is the tensor product operator and CQx, k) are the spatial Fourier coefficients given by: C = efo (3.22) Here, 00 represents the outer product operator of the x and k vectors. Again, for our purposes, we transform in the poloidal direction only, so we are left with the poloidal component of the wavenumber vector. 3.3 Calculating the average signal in time, frequency, and wavenumber domains We calculate the average value of the signal, since only normalized intensity fluctuations between GPI views yield meaningful comparisons due to the spatial variation of the gas-puff emission, differences in sensitivity for each view, and differences in gain. 45 The average value can be computed for the time series after computing the temporal and spatial transforms. 3.3.1 Time domain In the time domain, the average signal is simply computed at the average over all time-points: <I> o9(t) (3.23) N where N is again the total number of digitized points in the time series. 3.3.2 Frequency domain If we refer back to Equation 3.5, we note that g(t) in Fourier series representation has a constant "DC offset" ao. This offset is the average value of the signal in the time domain and is the f = 0 component of the frequency spectrum: N-1 1 2ir(n=O)t ( g(t)e t=o N (3.24) which reduces to Equation 3.23 for n = 0. 3.3.3 Wavenumber-frequency domain Since the spatial transform has added a dependence on wavenumber to the frequency spectrum, we can think of Therefore, to obtain (k, f) as having split (0) we must sum .4(f) into its various k-components. (k, 0) over the k-spectrum: = Z() (k, 0) (3.25) k 3.4 Root-mean-square (RMS) value of the signal If we wish to characterize the intensity fluctuations through the AC RMS value of the signal, we show in this section how this is accomplished in the time, frequency, and 46 wavenumber/frequency domains. To do this, we introduce Parseval's theorem:124, 25] 2 N-1 N-1 ig(t) 2 f) =(k, A2 E N f=0 t=O f=0 (3.26) k Parseval's theorem states that power is conserved after performing a Fourier transform. This theorem also ensures that we obtain the same RMS value in each domain. 3.4.1 Time domain The AC component of the RMS value for a discrete time series is defined as follows: N-1 IRMS = 3.4.2 (3.27) N2 t=O g(t)- < I > |2 Frequency Domain We can simply input Equation 3.26 into Equation 3.27 to obtain the RMS in the frequency domain: IN-1 IRMs = (3.28) 5(f)|2 2E f=1 Since we want the AC component only, we begin the sum with f 1 instead of f 0. 3.4.3 Wavenumber-frequency domain For the wavenumber-frequency domain, we must first sum over the k-resolved coefficients, yielding: IRMS 1N-i N2 Z f=1 47 kt 2 (k, f) (3.29) 3.5 Computation of fluctuations Here, we will briefly discuss some important points about the codes used to compute the fluctuations and perform the Fourier analysis. The basic method involves producing the discrete Fourier frequency spectrum as a function of view, frequency, and time. The user must specify the time series and corresponding times, along with a sampling frequency. The time series is split into a coarser set of time epochs of a length determined by the sampling frequency. An epoch is simply a block of time or time window; the total number of epochs multiplied by the number of time points in each epoch gives the total time sampled. Thus, if we have one second of data and each epoch is 0.0056 seconds, then we have 178 epochs; the leftover time is simply cut out. The RMS can be computed over a single epoch or multiple epochs. The user can also choose to normalize the signal, apply a hanning filter, and overlap blocks of signal to reduce error. 3.5.1 Epochs As mentioned above, we can take the RMS for a single epoch or for multiple epochs individually. If we want a single value for the RMS but accounting for all epochs, there are two ways to accomplish this. The first is to simply take the RMS for each epoch and then average those values over epochs: 1T-1 IRS = T E (3.30) IRMS,t i=O where IRMS,t is the RMS computed for each epoch t using one of Equations 3.27, 3.28, or 3.29. The second way first computes the spectrum for each epoch, then averages over the epochs to produce an average spectrum, and then calculates the RMS based on that average spectrum. In the frequency domain, this looks like: N-1 RMS I~s = f=1 48 T-1( (f,It)| T t=0 (3.31) and in the wavenumber-frequency domain this becomes: ,t) IRMs =(k, t=0- f=1 2 (3.32) k It is important to note that averaging in the first method (Equation 3.30) removes dependence on any slow variation, while the second method will leave slower-varying components if the epochs are long enough. For our purposes, however, we are not concerned about slow variation in the signal, which is the background and is not characteristic of the turbulence. We want the RMS average to account for fast variation in the plasma due to smaller-scale fluctuations and not due to slow changes in the plasma or gas-puff. The Fourier coefficients .(k, f, t) for individual epochs vary far more than the time-averaged Fourier coefficients (i.e. averaged over epochs). Normally this is not an issue and the first method will lead to a reasonable result. However, sometimes it can be an issue if we want, for example, to fit the spectra to a curve. If the variation is not averaged out (as in the second method), this extra variation leads to difficulty when using fitting programs. 3.5.2 Oversampling the spatial Fourier transform Oversampling allows the number of points in the k spectrum to be increased beyond the number of spatial points included the transform. It allows extension the wavenumber spectrum to wavenumbers smaller than that defined by Ikmin = 27/L, where L is the linear dimension of the view (~6 cm for the Phantom and ~3.9 cm for the APD system in the poloidal dimension). Ikmin| can be reduced by "oversampling," which assumes that any large features in the images vary smoothly across the included views. Of course the resolution of a single-k component will be limited by the linear dimension of the view (Ak = 27/L), but the spectra will be made smoother by this oversampling. For these analyses, we oversample by about a factor of 4, with Ikmin ~ 27/(4L). The maximum k cannot be increased above the Nyquist limit (kNyquist = i/pixel-spacing), so that ko,Nyquist = 49 33.5 cm- 1 for the Phantom camera images and ko,Nyquist = 8-1 cm' for the APD-based system). In other words, instead of setting the number of elements in the wavenumber array to the number of spatial points (as would be the case in an FFT). we have increased that number, effectively oversampling. It will be shown later in this chapter that the oversampling provides a justifiable wavenumber resolution. Our method of spatially Fourier transforming (Equations 3.20-3.22) allows the user to define the oversampling rate, and thus the oversampled wavenumber vector with which to perform the spatial transform. To avoid aliasing, km, is limited to 0.85*kNyquist for these analyses. 3.5.3 Normalization Each APD/Phantom view can in principle have a different gain and is in a different location relative to the gas puff nozzle, and thus each raw signal can have a different average value. Since we need to be able to compare different channels, we divide each frequency and wavenumber-frequency spectrum by the DC offset (i.e. the co component) in each epoch. We do not just subtract the DC offset since we have already subtracted it out in finding the AC component of the RMS value. Since the co component is divided by itself, IRMS/ < I> is unaffected by the normalization. No correction to IRMs/ < I > is needed. 3.6 Conditional wavenumber-frequency spectrum The numerical Fourier analysis gives the poloidal wavenumber-frequency spectrum for a signal in time from some set of views or pixels. This spectrum is a function of poloidal wavenumber, frequency, and time bin and is computed using the process described above. Note that only the poloidal wavenumber is computed, not the radial wavenumber. This means that only the spatial poloidal transform is performed. We call the values of the spectrum the spectral density S(k, w, t). This spectral density can be plotted as a contour over all frequencies and poloidal wavenumbers. An example using experimental data from a C-Mod shot is shown in Figure 3-2, where we have averaged over epochs. 50 Shot 1120815030 t - 1.2596 thru 1.2636 afc 15-1 -2 -4 -6 -4 -2 0 2 4 6 Iko (cm'1) Figure 3-2: Wavenumber-frequency spectrum for C-Mod shot #1120815030, p = 1.95 cm. The color scale is the log of the spectral power (the spectral density squared). The wavenumber-frequency spectrum automatically favors the brightest features in a time signal. Thus, to be able to pick out all features in a signal, we can normalize the spectral density at each frequency to produce what is called the conditional spectrum:1261 s(klw) - S(k,w) S(w) (3.33) Where s(klw) is the conditional spectral density, S(k, w) is the spectral density as a function of both wavenumber and frequency, and S(w) is the spectral density integrated over the wavenumbers at each frequency. This gives equal weight to each frequency in evaluating the relationship between poloidal wavenumber and frequency and does not weight it according to fluctuation power. The conditional wavenumberfrequency spectrum calculated for the spectrum in Figure 3-2 is shown in Figure 3-3a. We will use the conditional spectrum to perform the turbulence velocity analysis. 51 Shot 1120615030 150 iso 50 -6 -4 -2 ke 0 2 4 6 -10 0 -5 k (Cm~') 5 '0 ev" Figure 3-3: Conditional spectrum for C-Mod shot #1120815030, at p =1.95 cm. (a) using the oversamrpled method with the oversampling factor = 4, and (b) using tile two-point method. Tile oversampled method found a (hand-fitted) velocity of 3 km/s and a velocity using the max-integral-comiputation of 3.13 km/s, while the two-point method failed to produce a spectrum clear enough to make a measurement. 3.7 Velocity measurements with the Fourier technique There are multiple characteristics of the turbulence which call be studied with tile Fourier technique. The most important characteristic for this thesis is the velocity of the turbulence structures in the plasma. We call measure the velocity by using either the square of the spectral density or the conditional wavenumber-frequency spectrum, but most often the conditional spectrum. There are two different velocities which call be measured: the phase velocity and thle group velocity. The phase velocity is defined as: Vphase =-(3.34) k where w is the frequency (=27rf) and k is the wavenumber. Typically U) is a function of k; this function is called the dispersion relation. There call be a phase velocity associated with both the radial and the poloidal directions by simply using the radial 52 and poloidal wavenumbers, respectively. The group velocity is defined as: dk dw Vqru (3.35) We consider the plasma turbulence to be dispersionless when both the derivative of w with respect to k is a constant and w(k = 0) = 0. When this occurs, the group and phase velocities are equal. In the implementation of this technique, we typically assume no dispersion, and thus take the poloidal phase velocity to be the slope along the maxima in the conditional wavenumber-frequency spectrum. If there were non-zero dispersion, a curve could be fit, to the maxima, and the derivative could be taken. There are two different ways to fit the dispersionless velocity. The first involves handfitting a line by eye, i.e. by defining by eye a "best fit" line passing through the maxima of the s(klw) values and through f = 0, k = 0; the slope of the line is the phase velocity (shown in Figure 3-3a). The second method is computational. It takes a set of f/k=constant lines (passing through f = 0, k = 0) and integrates the s(klw) values along each line. The maximum integral determines which line gives the best fit. The slope of this line is then chosen as the phase velocity. This method only gives one output per direction (positive or negative wavenumbers). This method was used to determine the Fourier analysis points in Figure 2-1. If a lobe, i.e. a roughly straight positive-k or negative-k extended feature in the conditional spectrum, indicates dispersion, handfitting should be used, and several points along the lobe should be chosen to compute a velocity for each part of the lobe. 3.8 Comparison of oversampled Fourier technique with the two-point method The now well-known two-point method for measuring the wavenumber-frequency spectrum with fixed probe pairs was introduced by [261. To summarize the method, we imagine two measuring points located at x, and 53 Xb. The local wavenumber spec- trum is essentially the difference between the phases of the signals at each point divided by their spatial separation: 0(Xb, W) - 0(a, W) K(x, w) ~(.6 where x is the average location between xa and Xb. (3.36) To find the phases, we must first find the locally Fourier transformed signal, for a time signal g(x, t) to give and, following Equation 3.11, the phase angle will then be: 9(x, w) = arctan -img xW) real (x, w) Kth_ phantom (3.37) twopoint.pro is an implementation of this method, which I wrote. To compute the conditional spectrum, normally five sets of two points are used to compute a local wavenumber and then averaged. An example conditional spectrum for shot #1120815030, p = 1.95 cm is shown in Figure 3-3b, where this averaging of actually ten sets of two-point evaluations failed to produce a spectrum clear enough to make a phase velocity determination. Thus we conclude that the Fourier transform analyses, described in Sections 3.13.7 and used to produce the conditional spectrum shown in Figure 3-2, provide much more sensitivity and accuracy than the two point method.[27] The reasons are as follows. We can consider the two-point method to essentially be oversampling by a factor of 50-100. Such a large oversampling rate introduces error. As mentioned previously the multi-point spatial Fourier-transform also oversamples, but only by a factor of -4, which results in smoother spectra and is allowed as long as any small-k features are coherent across the array view. When the oversampling is 50-100, this assumption is far less good and loss of accuracy results. Using more spatial points reduces the error and provides greater wavenumber resolution. Thus the multi-point spatial transform, with an oversampling rate of ~4, provides a reasonable tradeoff between wavenumber range and mathematical rigor. 54 3.9 Comparison of results between GPI Phantom Camera and APDs As discussed in Chapter 1, we have two different detector systems for the GPI: the avalanche photodiodes (APDs) and the Phantom Camera. Because the APDs have significantly better signal to noise while the Phantom Camera has slightly better special resolution, we want to compare both the qualitative and the quantitative similarities and differences between the two detector systems. We can use the APDs to validate (or not), the results of the Phantom Camera. To do this, we will use the conditional spectra of a few actual shots. Qualitatively, both the Phantom Camera and the APDs should find the same features; quantitatively these features should have the same location in k - .f space, giving the same velocity. The first shot we will investigate is #/1120712027, an Ohmic H-Mode 131 with a clearly visible quasi-coherent mode structure visible. Figure 3.4 shows the conditional spectra from the Phantom Camera and the APDs averaged over 10 msec of data. Both the Phantom Camera and the APDs have detected the QCM, the feature at 80-120 kHz and k ~ 2cm7 1 . It is apparent that the ko resolution for the Phantom is better, due a 6 cm vertical view compared with a 3.9 cm for the APD-based system and six times the number of vertical points in a column (recall that Akin = 27r/L). However, the two systems find values of k for the QCM, that differ by ~20%, with k0 - 1.8 cm- 1 (Phantom) and at 2.2 cm- 1 (APDs). The reason for this difference in the detected ko for essentially the same turbulence structures is still not understood. It is also apparent that the APD system detects more relative fluctuation in the 150-200 kHz band and in the 25-60 kHz band. This is due to the higher sensitivity of the APD system compared to the Phantom camera. More importantly though, the differences in poloidal wavenumber between the data for the two detectors causes differences in the measured phase velocities, a ~20% difference for the QCM phase velocity and a ~50% difference for the k < 0 lobe (see Figure 3-4). 55 Sot 1120712027 0 50 -6 Figure t - 1.4400 thru 1.4431 SUe ShAt #1120712=7 t - 1,4400 thrU 1.4434 sft 3-4: -4 -2 0 k# (emW') 2 Conditional 4 5 -6 wavenumber-frequency -4 -2 0 ko(m' spectrum 2 for 4 6 C-Mod shot #1120712027, with hand-fit velocities shown. (a) Phantom Camera, (b) APDs. The next shot will we analyze is #1120224009, for 15 msec of data, during an L-mode phase.[3 Figure 3-5 shows that that the Phantom Camera and the APDs find qualitatively similar ko, f spectra, with features moving upward. However, the differences remain. The Phantom Camera is less sensitive and therefore shows no features above the noise at frequencies higher than -150 kHz. Let us now consider a third shot, #1110121019. Figure 3-6 (a-d) show results from both the Phantom Camera and the APDs for two different locations, along with the hand-fitted velocities through some of the main features. Note that while the frequencies of the features seem to match, the poloidal wavenumbers differ, causing a difference in the poloidal phase velocity. The reasons for this difference are currently unknown. 3.10 Limitations of the Fourier method To summarize, there are a few limitations on the Fourier method for velocity analysis, which have arisen in this discussion. The first is that due to the distinct behavior change of the plasma at the separatrix, we cannot complete a radial Fourier transform 56 Shot #I I I -6 $ot -4 -2 J1 120224009 0 k# (cm') t 2 4 -6 6 -4 -2 0 2 4 6 k (CM-') ShOt I 120224009 - 0.7010 thm 0.7153 sec t - 0.7010 thm 0.7153 sWc 1150 o100 -6 Figure 3-5: #1120224009. -4 -2 0 kO(.m') 2 4 6 -6 -4 -2 0 k 2 4 1 (c) Conditional wavenumber-frequency spectrum (top) Phantom Camera, and (bottom) APDs. for C-Mod shot using the full radial coverage of the views (this will be discussed further in Chapter 6). The second limitation is that the formalism for performing a spatial Fourier transform was designed for a rectilinear coordinate system in which the directions are at perfect right angles. While the poloidal direction is almost vertical, and the radial direction is nearly perpendicular to it, some (small) error has been introduced. Third, as has been shown in the previous section, the Fourier method applied to data from both GPI detectors (APD array and Phantom Camera) do not show the same features with exactly the same wavenumber-frequency spectrum; this affects the velocity measurements. The reasons for this are unknown, and thus we cannot say 57 ShWr 1110121019 t - 1.2200 thni 1.2498 sec 150 150 - -4 -2 0 2 ko (0m') 4 6 Figure 3-6: Conditional spectra for shot -6 -4 -2 0 k 2 4 6 (Cm-') #1110121019. The top plots use data from the Phantom Camera, while the bottom plots use data from the APDs. Results for each system are shown for two radial locations (p ~ -0.9 cm and ~0.09 cm). Qualitatively, the Phantom Camera and APDs detected the same features. However, there are differences in the poloidal wavenumbers for the features, which lead to the inference of different velocity measurements. A cross-comparison of the Phantomderived and APD-derived feature velocities for one of the shots of Figure 2-1 is shown in Chapter 7 (as Figure 7-11). Generally the agreement is within 20%. with total confidence that the data from one detector perfectly validates the data from the other. However, as was shown, qualitatively they agree well, and the differences in quantitative measurements are generally not large. 58 Chapter 4 Tracking time-delay estimation technique for determining structure velocities in time-series images As mentioned in Chapter 2, we are considering two different methods for analyzing GPI measurements and trying to understand why they can disagree for the same data. The first, Fourier analysis, was discussed in detail in the previous chapter. In this chapter, we will discuss the second method, tracking time-delay-estimation.[3, 41 The general idea for this method is a combination of time-delay-estimation (TDE) and pattern tracking within some defined search box. We will begin by defining some of the important mathematics necessary as well as the specific implementation used to perform the analysis of data in this thesis. We will end by discussing some limitations of this method. 4.1 Cross-correlation function There are several different ways to implement TDE.[281 We will focus on a method using a direct cross-correlation between two discrete time signals. The cross-correlation 59 function is defined for a continuous signal as: (f * g) (t) = where f (4.1) f*(t)g(t +,T)dt and g are two functions of time t, and T is a finite time interval called the time lag.[29, 301 For a discrete signal, we can use a summation instead of an integral: 00 f*[n]g[n + T] (f * g) [r] = 71 (4.2) =-00 where n is now a discrete time instead of continuous time t. This function is a measure of how much a signal's behavior varies in time relative to another signal's behavior. We consider different time lags because changes in one signal could be seen at one time, but correlated changes in the other could take place a little earlier (negative -r; the first signal lags the second) or later (positive T; the second signal lags the first). When two signals are perfectly correlated (i.e. the changes in the behavior of one signal match changes in the behavior of the other), their cross-correlation is +1. Autocorrelation is the cross-correlation of a signal with itself as a function of time delay or lag. When two signals are perfectly anti-correlated, their cross-correlation is -1. For time delay estimation, we define the time delay in the cross-correlation as: Tdelay = arg max((f * g) (T)) (4.3) which is just the argument of the maximum in the cross-correlation function, where we are convolving g with the complex conjugate of f as a function of t. The phantom camera produces a set of two-dimensional frames in time. The pixels in the camera each have their own sensitivities to signal, which could affect the value of the cross-correlation function. Thus we wish to normalize out the pixelto-pixel variation in the response. We do this by subtracting the mean signal and then dividing by the square root of the product of the standard deviation in the two 60 signals. This is implemented numerically using the following formula: N-T (f-k+r|- E- Zkt I) (9k - 0 (4.4) r > 0 (4.5) N-11- 1 (fk- f ( - , where N is the number of points in the time series of the signals f and g. 4.2 Implementation As described in 13], Phantom Camera images taken over roughly three to five millisec- onds duration were analyzed. This length of time was chosen to ensure that enough data were selected to obtain an accurate answer while ensuring efficiency of the code (longer time series takes longer to process). Selecting shorter time series would result in not including lower frequency correlations. In principle, a time series of any length could be used. Each frame in the series is first spatially smoothed and normalized to reduce noise. Then a reference pixel is selected and a search box of ±8 pixels in each direction surrounding it is designated, for a total of 17x17 or 289 pixels. The cross-correlation function for the reference pixel and every other pixel in the search box is computed for lags up to ±10 frames, with the time between frames being 2.5 ps. The maximum in the cross-correlation function for each time lag is found, and Ai pixels and Aj pixels are computed, where Ai and Aj represent the distance in radial and vertical pixel-space, respectively, between the reference pixel and the pixel for which the maximum cross-correlation was found (for that time lag). This is shown for a time lag of +1 frame in Figure 4-1. Once the cross-correlation maxima vs. time lag are found, with the corresponding Ai and Aj in pixels, a horizontal (vertical) velocity is computed for each time lag, by dividing the Ai (Aj) by the lag, and converting to km/s. As long as the crosscorrelation function was at least 0.5, and as long as there are at least four time lags 61 One Frame t 25 is time series t Figure 4-1: Illustration of reference pixel inside its search box for the tracking TDE analysis. Here, the peak of the cross-correlation function is found within the box[7]. (of the 20 total) meeting that criterion, the final velocity in that location is computed by averaging over the velocities meeting those criteria. This process is computed for reference pixels that are not within 8 pixels of the edge of the frame. The user has the choice of further restricting the region of reference pixels. Because of the search box size and the requirement that four lags yield cross-correlation maxima above the threshold, this particular implementation detects velocities only between -2.0 km/s and +2.0 km/s, in both the Z and the R directions. There are two outputs of the code. First are poloidal and radial velocity profiles as a function of rho, where the velocities for reference pixels within 0.5 cm in rho are averaged together, and reported as the velocity in the median of the range considered for rho. They are evaluated at p (cm) = -1.25, -0.75, -0.25, 0.25, and 0.75, with error bars computed as the standard deviation of the measurement. This output is meant to be the "mean" flow at particular locations near the separatrix. The second output is a velocity map, in which the velocity vectors are represented as arrows (Figure 4-2). The arrows point in the direction of motion at each location, and the lengths of the arrows are relative to that of the maximum velocity in the field (which has a fixed length). Not every vector is shown, for two reasons. First, the user can choose the 62 percentage of pixels for which a velocity computation is attempted in order to reduce computation time (e.g. every third pixel in every third row so that 1/9 of the total number of pixels are used). Second, if the computed lag-velocities for that pixel do not meet the threshold criteria stated above, then no velocity is found for that pixel. Shot 1 120712027 60 50 t 40 30 20 10 0 0 10 20 30 4D 50 60 Figure 4-2: Example of a velocity map for 4ms of C-Mod data, with axis labels representing pixel number. Velocity computations were attempted for 1/9 of the pixels in the frame. The maximum velocity in the field is 0.574 km/s. 4.3 Known limitations of this method As we did in Chapter 3 for the Fourier analysis, we will describe the known uncertainties and limitations with the tracking TDE analysis method. The most obvious is that this particular implementation is limited to finding velocities no larger than 2.0 km/s. Certain flows are known to move at faster speeds (e.g. when using RF heating 121). These flows will not be detected by this particular implementation of the tracking TDE method. By the virtue of searching for the maxima in the cross- 63 correlation function, it cannot find multiple flows in the same region; it can only find the dominant motion caused by the largest structures and the most intense. At most it will find some combination of any multiple flows, so that the output should be interpreted as some average velocity in the region. It makes the assumption that the individual structures do not change in size or intensity; we know in the real data that the blobs characteristics may change in time. This method is subject to what is called the aperture effect, in which a change in intensity for the reference pixel is necessary to detect the motion.141 64 Chapter 5 Generation and use of synthetic data for testing analysis techniques We have chosen to use synthetic data as a means of testing for the strengths and weaknesses of the implementations of the Fourier analysis technique [1 (described in Chapter 3) and the tracking TDE technique [3] (described in Chapter 4). Currently, neither code can be used to benchmark the other, and this motivates the need to generate data for which we know the relevant input parameters such as velocity, size, distribution, and intensity beforehand so that the accuracy and fidelity of each code and method can be tested rigorously. This will provide insight on the quantities that are "weighted" most heavily by each analysis technique. In the end we wish to understand why the two techniques differ in their conclusions about turbulence velocities. To this end, the challenge is to generate synthetic data that mimics as closely as possible the real data. We will describe how the synthetic data are generated, compare the synthetic data to real, and provide a sample analysis. 5.1 Generation of synthetic data The basic principle behind the generation was to assume that the GPI turbulence structures can be treated as "blobs" which have a given shape, velocity, and distribution of sizes and intensities. The large blobs detected by the Phantom Camera 65 system appear to be roughly circular in shape when viewed parallel to the local field. The APD system detects blob shapes that are more elliptical than circular for reasons that are still unclear.[1] We have chosen the synthetic blobs to be circular. The user is allowed to input both a horizontal (R) and vertical velocity (Z) for the blob field. This means that all blobs in a single generated field will be moving with the same velocity at all times and do not change shape as they move. The user can specify a statistical distribution from which to assign a size and intensity to individual blobs in the field. Currently, the options are a normal distribution and a gamma distribution (where gamma can be one up to nine in value). The user can then define a maximum intensity and maximum full width at half of the intensity maximum (FWHM) for the blob distribution. Note that, as implemented, a given blob intensity and FWHM are determined by the same randomly generated value. Three other important options for the user are the number of fields, the number of time steps, and whether or not to add noise to the synthetic signal. First, the user may want to be able to have blobs moving at different speeds within the same field of view. The user can choose how many blob fields to generate, and the signals in each pixel or view will be added for each field generated. Thus it is possible to choose different fields to have different velocities, distributions, and different maximum intensities and sizes. Second, rather than fixing the length of time for which the signals will be generated, the length of time is variable to the fidelity of the codes in terms of the length of the time series. Third, the real data are subject to noise in the Phantom Camera. Thus, the user has the option to add noise from a no-plasma C-Mod shot (Shot #1120712007). An example of the end result is shown in Figure 5-1. There are two methods for generating the blob fields. The first method, developed by J. Terry, involves creating a large static field of blobs, and then reading out the intensity values in each pixel at a defined rate to simulate a moving field. This has the advantage that once the field is generated it can be read multiple times to obtain a signal from multiple fields moving at different speeds. It also has the advantage of not limiting the size of the blobs generated. It has the disadvantage of being unable to choose different distributions, maximum sizes, and maximum intensities for 66 Figure 5-1: Example of synthetic blob field with noise added. The motion of a single blob is indicated by the arrow. a single generated field. However, the user can generate multiple static fields, scan each, and then add the signals from each. The second method, which I developed, generates the blobs as the signals for each view are saved to the C-Mod data archive. The blobs are generated outside the field of view, and move into the field of view after so many time steps depending on the chosen velocity. This also allows the user to generate multiple fields with completely different characteristics for an individual shot. It has the disadvantage of limiting blob size because of the fixed size of the field over which the blobs are generated before moving into the field of view. It is also slightly more computationally intensive since the signals must be computed at each time step. However, both methods lead to the same results for the same input parameters. Included in Appendix A is part of the code which implements the second method, as well as definitions for the input variables. 5.2 Comparison of synthetic data to real data We wish to mimic the real data as much as possible. As such, it is important to compare certain statistical properties of the synthetic data to those of the real. First, 67 both a real and a synthetic signal are shown in Figure 5-2. Nhot i1209i1IM&Rft %ne Nnb a 4 10 1.190 1.11 1.10 1.105 Tk"W"TW 1.1"4 0.100 1.105 on*nees 0.01 .0 0.03 0.004 Figure 5-2: Example signal in a time for a pixel viewing the plasma scrape-off-layer (a), and example of a synthetic signal (b). Note that the time duration shown for each is the same, i.e. 5 ms. Unless the signal is simply too low, or there is no signal in a pixel, the absolute magnitude of the signal is unimportant since the signals are normalized during the analysis. Thus, to compare the synthetic data to the real data, we compare their statistical properties. One such property is the probability density function (PDF), which is just the probability distribution as a function of fluctuation magnitude, which is defined as follows: ~I- <I> I = 0'(I) (5.1) where a(I) is the standard deviation of the signal. Examples of PDFs for both a real shot and a synthetic trial are given in Figure 5-3 a and b, respectively. The synthetic data were specifically designed to output any gamma (or normal) distribution of blob sizes and intensities. This is to mimic how blob intensity varies from being (approximately) normally-distributed inside and just outside the last closed flux surface to being gamma distributed (gamnma-9) in the far scrape off layer. 1131 Since we are most concerned with the turbulence in the scrape off layer, for most trial shots, gamma-9 was chosen. No initial dependence of distribution on the velocity measurement was found (as seen in Figure 5-4). Thus, to first order, we believe our synthetic data properly mimic the real data well enough to be used for this study. 68 Shot 1120815021 U_ LF.M Gunmma4 **6 000' I iL0.0100: ' 0.001 O010 - OMWO~l 0.0001 ---.-- -1 -2 0 , a.M1 1 2 3 4 -2 . . -1 0 1 , , 2 3 4 (0sp0YOM( Figure 5-3: Normalized (to total fluctuations in signal) PDF for a real shot (left) from a pixel viewing the far scrape-off-layer, and for a synthetic trial where gamma-9 (right). t Shot I I 1161123 -6 -4 -2 0.9000 thru 0.9046 sec 0 ke (Cm') 2 4 SW -6 6 t 111181123 -4 -2 - 0.90 0 thr.u 0.9046 Wec 2 4 6 kS (em') Figure 5-4: (left) Spectrogram of the log of the spectral power (Fourier amplitude squared) as a function of poloidal wavenumber and frequency for a single-velocity field. (right) Conditional spectrum for the same single-velocity field. Input vertical velocity = 1.01 km/sec and input horizontal velocity = 0.0 km/sec. The red line through the lobe of the conditional spectrum indicates a phase velocity of 1.0 km/sec, i.e. it reproduces the input vertical velocity. The errors in the measurements are ~5%. 5.3 5.3.1 Sample analysis on single-field and two-field shots Sample Fourier analysis When developing the synthetic data, we expected the Fourier analysis for a singlevelocity field to be straightforward and easy to predict. If the input poloidal velocity 69 is positive, then the blobs move in the electron diamagnetic drift direction (positive wavenumber for Alcator C-Mod's normal toroidal field direction), and vice-versa for a negative input poloidal velocity. Both the wavenumber-frequency spectrum and the conditional spectrum were expected to have a single lobe. The slope of the lobe is the measured velocity. This was indeed demonstrated for several trials (see Figure 5-4). A two-velocity shot was expected to be more complicated, but similar in output. We expected there to be two lobes, with the velocity of each field being the slope measured for each lobe. In several trials, this was demonstrated provided that the intensity of the second field was large enough to be detected (see Figure 5-5). The effect of intensity of the blob fields will be discussed in Chapter 7. Shot I11161081 -6 -4 t -2 - 0.9000 Uwu 0.9046 sec 0 2 4 Shot 6 111161081 -6 -4 t -2 - 0.900G 0 thru 0.9048 sc 2 4 6 Figure 5-5: Same as in Figure 5.4, but for a two-velocity field. Input vertical velocities were 0.39 km/s and 1.56 km/s, and input horizontal velocities were 0.08 km/s and 0.39 km/s. The lines through the lobes indicate that the Fourier analysis nearly reproduced the input vertical velocities. Errors on the measurements are approximately 5%. Reasons for not exactly reproducing the velocities will be explained in Chapter 6. 5.3.2 Sample tracking TDE analysis We expected the tracking TDE analysis to produce velocity maps which were uniform in direction for the synthetic data since the synthetic data would have uniform, isotropic fields of blobs all moving in the same direction, or in the case of different 70 directions (two or more fields overlapping), the differences would average out over a long enough period of time. This was indeed the case for most trials, especially when there was one field, or two fields with the same sign in poloidal/radial velocity. See Figure 5-6 for examples of velocity maps for the same single-velocity (input vertical velocity = 1.01 km/s and input horizontal velocity = 0.0 km/s) and double-velocity shots (input vertical velocities = 0.39 km/s and 1.56 km/s and input horizontal velocities = 0.08 km/s and 0.39 km/s). For the single-velocity synthetic shot, the velocities found by the analysis were Vert = 0.8 km/s and Va, = 0.02 km/s; for the two-velocity shot, t he velocities found were Vert = 0.42 km/s and Vho, =0.04 km/s. .. SO Shot 111161081 Shot 111161123 ........ LL~ L* L j j 60 L 50 50 1 pol L 40 40 30 30 I 20 r 10 10 I SI I A .- S i .. jI..j 0 0 10 20 30 40 50 60 0 10 20 30 40 I I 50 60 Figure 5-6: Velocity maps for single-velocity (left), and double-velocity (right) shots. Axes are both in pixels, with the view as it actually is in the machine. (left) Input vertical velocity = 1.01 km/s and input horizontal velocity = 0 km/s, and the analysis yielded a vertical velocity of 0.8 km/s and a horizontal velocity of 0.02 km/s. (right) Input vertical velocities = 0.39 km/s and 1.56 km/s and input horizontal velocities = 0.08 km/s and 0.39 km/s, while the analysis yielded a vertical velocity of 0.42 km/s and a horizontal velocity of 0.04 km/s. Errors were approximately 5% for each measurement. 71 72 Chapter 6 Modifications needed for use of Fourier and tracking TDE techniques After generating synthetic data, we tested each code rigorously for strengths and weaknesses. In this chapter, we describe some of the weaknesses of each code that could possibly affect the results of the real data, and offer ways to correct these issues. The first section will cover issues we found with the Fourier analysis code; the second section will cover issues we found with the tracking TDE analysis code. Ve also tested the effect of adding noise to the synthetic data; this is described in the third section. The last two sections apply the corrections to analysis for real data. Ultimately we found that these corrections only explain a small portion of the original discrepancies. 6.1 Issues found when applying the Fourier analysis 6.1.1 Vertical velocity error when radial velocity is not small A velocity scan using synthetic images with single (known) vertical and radial structure (blob) velocities was completed. Single velocity fields were generated, each with the same maximum intensity and FWHM, but varying the radial and vertical input velocities. Figure 6-1 shows the relationship between the output vertical velocity and the input vertical velocity, using the Fourier analysis. Increasing the radial veloc- 73 ity, relative to the vertical, increases artificially the vertical velocity found from the analysis above the actual vertical velocity. As seen in Figure 6-1, when the ratio of the actual radial to actual vertical velocities is less than -0.5, the returned vertical velocity is within 20% of the input value. However, when the ratio is 1, the returned vertical velocity is wrong by a factor of ~2, with the error increasing steeply as the ratio increases beyond 1. This effect is caused by the fact that we are only performing the column transform (vertical in viewing space) during the analysis, rather than performing both the column (vertical) and row (radial) transforms. 12 p100. > 42>2 0.0 0.5 1.0 1.5 2.0 VRAVz (input) 2.5 3.0 Figure 6-1: Ratio of output to input vertical velocity vs. ratio of input horizontal to input vertical velocity for a series of synthetic shots. The blue dashed line indicates what the output should have been based on the input velocities. 6.1.2 Wavefront model to explain the observations from the Fourier analysis applied in only one spatial dimension We will now derive a model in which we treat the blobs as wavefronts, and will show that this wavefront model explains these results. Let us begin by assuming that in the R-Z plane, the wavefronts are moving so that the normal to the fronts is at an angle a to the horizontal (see Figure 6-2). The normal to the wavefronts points in the direction of the total actual velocity of the blobs. Each wave has a wavelength A, the 74 distance between successive wavefronts. We assert that the spatial Fourier analysis breaks up the wavelength into its R or Z component, when performing only a row transform or only a column transform, respectively. Simple geometry dictates that: A' n Ax/= A sin a cos a (6.1) R Figure 6-2: Wavefront model with angle a shown. Thus, there are wavenumbers in both the Z and R directions. These are given by: k' 27r k' Z A'zR 27r - , A/ (6.2) As mentioned in Chapter 3, the phase velocity is given by 27rf/k. Thus, there is an associated phase velocity with each direction, given by: ' = 27rf Vz = 27rf k' V6.3I k, Z (6.3) R The frequency f of the wave does not change with direction. Recognizing that the total phase velocity can also be written as f A, and each directional phase velocity component is just the product of the frequency and the directional wavelength, we 75 can write the directional velocities in terms of the total velocity: Ij = (6.4) .V , V = I sina cosa where V is the input velocity of the wave. From the diagram, we can write sine and cosine in terms of the Z and R components of the actual velocity V. Simplifying our expression then, we can write the effective phase velocities in the Z and R directions, obtained by examining only the projections of the wavelengths with the frequencies, and normalized by the actual components of the phase velocity, as: J Vj -=1+ VR) V' Vz VZ VR (Vz (-Z) 2 (6.5) VR This implies, for example, that if the input VR is large compared to the input Vz, the Vz found by the Fourier analysis performed in the Z direction will be large compared to the actual Vz component. Of course, the same will be true of the VR found by the radial Fourier analysis when Vz is large compared to VR. When Equation 6.5 is plotted against the data found from the poloidal Fourier analysis results shown in Figure 6-1, it is an excellent fit (Figure 6-3). 8 4 ------------------- 0.0 0.5 1.0 1,5 2.0 2.5 v'/v' (input) Figure 6-3: Wavefront prediction for the output vertical Z velocity for the Fourier analysis. The model prediction (Equation 6.3) is the green dashed line; the synthetic shots are shown with error bars. 76 We can solve for the input velocities individually in terms of the outputs. In Equation 6.5, dividing the equation for V5/Vz by the equation for Vj'/VR, we eventually arrive at a cubic equation for the ratio of Vz/V, Z3 q as a function of Vz/VR: V Z VZ2+ + =0 (6.6) There is one real solution to this equation: -= - 11(6.7) VR Vz We can substitute this back into Equation 6.5 to find the original velocities as a function of the outputs: V,z2(6.8) 1+ 6.2 !V ),' =R +() Issues found when applying the Tracking TDE analysis We performed the tracking TDE analysis on the same trials used for the velocity scan for the Fourier analysis described above. We predict that there should not be any dependence on the input horizontal velocity VR for the output Vz measurement, or vice-versa, since the change in pixels in each direction corresponding to the peak in the cross-correlation function are computed independently. This proved to be the case; however, the tracking TDE analysis systematically underestimates both outputs by 20-30% (Figure 6-4). Obviously the biggest concern is with the limit in maximum velocity that can be detected by the code. If one has knowledge that there is a fast flow in the plasma boundary (V > ~ 4 km/s), it is simply recommended to not use the TDE analysis. 77 2.0I 1.6 -- lp lA A/ 02.0 0 ' Q .0 0.0 0.5 1.0 I. 2.0 0.0 33 2.5 0.6 np. Paboid Vbcly (ns) 1.0 1.6 2.0 6WuRdWVdoty "m) 2.5 3.0 Figure 6-4: For tracking TDE analysis: (a) Output poloidal velocity vs. input poloidal velocity, (b) Output radial velocity vs. input radial velocity. Both outputs are systematically smaller than the actual structure velocities, indicating that there are issues with the TDE method that need to be understood. 6.2.1 Effect of search box size on velocity measurement Recalling from Chapter 4 that the cross-correlations are examined only within search boxes of size t8 pixels with respect to the reference pixel, we can understand that the size of the search box limits the detectable velocity. A search box size of ±8 pixels theoretically allows a maximum velocity measurement of t 2.8 km/s [3] as long as only one time lag with a cross-correlation value above the threshold is required. A scan of the relationship between search box size and output poloidal velocity was completed for an input vertical velocity of 2.0 km/s and the results are shown in Figure 6-5. 2.0 E 1,9 A 1.7 CL 16 18 20 22 Vbaf size (pixels) 24 26 Figure 6-5: Output poloidal velocity for tracking TDE vs. search box size in pixels. The input (actual) poloidal velocity was 2.0 km/s. 78 40 4D .5 6 is a 0.6 0.4 0.2 0.0 Figure 6-6: Cross-correlation function for a reference pixel, contoured for time lags of 10 frames (upper left corner) through +10 frames (bottom right corner), not including zero lag. The search box size is 17x17 pixels, while the blobs have a FWHM of ~8 pixels. A well-defined peak in the function that meets the threshold, is only in the search box for four lags, yet the average velocity is calculated using values for 10 lags, as listed in 6.1. The scale reflects the value of the cross-correlation with the reference pixel for the given lag. Increasing the size of the search box improves the results. There are two reasons for this. First, typical blob sizes are roughly 1 cm in diameter. Each pixel is slightly less than 0.1 cm across, so most blobs fill most of a search box (11 pixels across). The second reason is that because for larger velocities the peak of the cross correlation function for a reference pixel could be outside the search box (Figure 6-6). Nonetheless, as long as the threshold cross-correlation value is obtained there, the code treats the peak as being at the edge of the box; for a given time lag, this decreases the change 79 in the number of pixels (Ai and Aj ) thereby decreasing the velocity computed for that lag (Table 6.1). Lag Max CC Ai Aj -12.5 0.70 -1 -8 -10 0.91 -1 -8 -7.5 0.99 0 -8 -5 0.99 0 -5 -2.5 0.99 0 -3 2.5 0.99 0 3 5 0.99 0 5 7.5 0.99 0 8 10 0.92 0 8 12.5 0.72 1 8 Table 6.1: Lags (measured in ps) used for computation of poloidal and radial velocities for a reference pixel in tracking TDE, for a synthetic shot with a purely vertical input velocity (1 km/s), and the change in pixels Ai and Aj for the horizontal and vertical directions, respectively. Only lags whose maximum cross-correlations meet the 0.5 threshold are included in this table. After conversion from pixels/lag to km/s, the output poloidal velocity for this shot was 0.82 krn/s; the output radial velocity was -0.1 km/s. There are two ways to correct this issue. The first entails increasing the search box size. However, as can be seen from Figure 6-5, the search box would have to be larger than it is currently (17x17 pixels). This creates a second issue of how to meaningfully count the change in pixels from one frame to the next for a given time lag. The second way to correct avoids this issue by simply requiring that the peak in the cross correlation function be within the search box for a given lag, in order for the velocity corresponding to that lag to be included in the average. We have done this for the shot in Table 6.1, and the new results are listed in Table 6.2. Lag Max CC Ai Aj -5 0.99 -0.35 -5.2 -2.5 0.99 -0.20 -2.65 2.5 0.99 0 2.5 5 0.99 0.25 5.15 Table 6.2: Results for same synthetic shot after requiring that the pixel at which a maximum in the cross-correlation occurs be located in the search box. Only four lags are used in the average. The new output poloidal velocity for this shot was 0.93 km/s; the new output radial velocity was -0.1 km/s. 80 6.2.2 Requirement that there be at least four velocities lags in the average The second major issue in the tracking TDE code is that in order to evaluate the velocity for a location in the Phantom Camera images, the velocities computed from at least four time lags must meet the threshold. If that is the case, then those values are averaged. This reduces the maximum detectable velocity from ~0.5x the searchbox dimension/minimum-lag-time to half that. To correct this, we have modified the code to eliminate this requirement. For example, if only two velocities computed from the time lags meet the threshold, then only those two get averaged. 6.3 Effect of adding noise to the synthetic data A separate issue possibly affecting both methods/codes was that of the noise inherent in the real data. Noise could possibly affect the measurements if the pixel to pixel variation has a gradient or some pattern to it, especially for the tracking TDE analysis. Thus, it is important to quantify this effect by comparing trials with and without noise, while keeping all other inputs constant (same velocities, intensities, sizes, and distributions). To do this, a series of single-velocity shots was created each with the same level of absolute real noise, varying the absolute average signal. A sampling of the results is shown in Figure 6-7. The Fourier analysis code finds the expected result (accounting for the systematic errors described above) for all levels of signal, although quality was significantly reduced at low signal-to-noise (as seen in Figure 6-7b). The tracking TDE breaks down for a ratio of the standard deviations of light to noise of approximately 2.2. In other words, it fails to find a velocity measurement. At larger Elight/Znoise, the tracking TDE analysis yielded expected values (after accounting for systematic errors). Thus, we conclude that noise does not inherently invalidate the velocity measurements. 81 Sho. 11311220 I - 0.90CM thru 0,9097 sec 1. 0,0 F~~~ -0.$ -2.0 -20 -10 0 10 20 -20 -10 g(Cfwr) 0 ke (CM 1) 0 20 Figure 6-7: Wavenumber-frequency spectrograms from the Fourier analysis for -oise = 2.2 at the breakdown level for the tracking TDE (a), and (b) the Eight/E conditional spectrum where a faint feature is still available for which a valid velocity is obtained using the Fourier analysis. Elight/Enoise in this case is 0.87. 6.4 Corrections to tracking TDE code, applied to real data We wish to see whether or not the improvements we have made the tracking TDE code will help resolve the initial discrepancies we saw in Chapter 2. We will discuss the wavefront issue for the Fourier analysis in the next section. Table 6.3 has the original and new values for six shots, using the improvements we have proposed here, for the rho-profiles. Table 6.4 displays similar data for the radial velocities. In general, the larger percentage changes were for small velocities (< 0.2 km/s in magnitude). As discussed in Chapter 2, the discrepancies between the velocities obtained with the Fourier analysis and those obtained with the tracking TDE were usually at least a factor of 2, or more than 100% in terms of percentages. Therefore, we can confidently say that these improvements in the tracking TDE code only account for a small portion of the total discrepancy. 82 Rho (cm) 224009 -1.25 -0.75 -0.25 0.25 0.75 Shot number (1120+) 224015 224022 224023 224024 224027 - -1.369 -0.744 -0.596 -0.295 -1.084 - - -0.844 -0.699 -0.320 -1.177 -0.288 -1.238 -0.504 -0.436 -0.278 -0.205 -0.289 -1.38 -0.652 -0.559 -0.415 0.013 0.143 -0.889 -0.681 -0.874 -0.452 0.538 0.072 -1.124 -0.733 -1.022 -0.390 0.623 0.532 -0.837 -0.131 -0.063 0.038 0.571 0.043 0.603 0.550 -0.844 -0.080 -0.202 0.561 -0.304 0.203 0.057 0.088 0.479 0.523 0.062 0.229 0.053 0.081 0.457 Table 6.3: Original [31 (black entries) and new (bold entries) values of poloidal velocity as computed with the tracking TDE analysis after applying the improvements suggested in this chapter (km/s). For the data in these shots, no measurements changed directions. A few points are not given because the data at those locations were too noisy to yield a measurement. Rho (cm) -1.25 -0.75 -0.25 0.25 0.75 Shot number (1120+) 224009 - 224015 -0.054 224022 -0.146 224023 0.024 224024 0.017 224027 -0.107 - - -0.039 0.007 -0.019 -0.101 -0.108 0.006 0.038 0.062 0.06 0.019 -0.120 0.02 0.052 0.062 0.067 0.041 0.001 0.069 0.052 0.096 0.102 0.068 -0.005 0.039 0.046 0.057 0.106 0.099 0.046 0.074 0.088 0.096 0.135 0.131 0.057 0.092 0.084 0.101 0.137 0.128 0.071 0.12 0.088 0.17 0.15 0.187 0.049 0.195 0.096 0.157 0.150 0.155 Table 6.4: Original 131 (black entries) and new (bold entries) values of radial velocity as computed with the tracking TDE analysis after applying the improvements (km/s). For the data in these shots, no measurements changed directions. A few points are not given because the data at those locations were too noisy to yield a measurement. 6.5 Corrections to Fourier analysis, applied to real data We will now investigate how much of a correction, if any is needed to the poloidal velocities in the real data due to any radial component, as according to the wavefront 83 model in Figure 6-3. To test this, we must first understand exactly what happens to the conditional spectrum when there is a significant radial component if we are trying to measure the poloidal velocity, and vice-versa. Figure 6-8 illustrates what happens when we increase the ratio of input Vz/VR when analyzing for VR (which is equivalent to analyzing Vz and increasing input VR/Vz). As is seen, the region in Shot t - 0.9000 theu 0.9046 et 116 1137 Shot #111161138 t 0.9000 theu 0.9046 "ec - ISO 100 100 50 50 -6 S"#t -4 -2 0 k, (CM-) 2 6 4 -6 -2 k' t - V9WhU 0.S46 WCe 111t161135 -4 Shot #111161134 t - 0 (Oen-) 0.9000 2 4 6 thru 0.9046 see 160 160 ISO 100 so -6 -4 -2 0 2 6 4 Shot 0111161123 -6 t - 0.9000 -4 thcu 0.9046 2 4 -2 2 4 6 ec 100 Sc -6 -4 -2 0 k' 6 (.m) Figure 6-8: Radial conditional spectra for varying input Vz/VR. (a) Vz/VR Vz/VR = 2. (c) Vz/VR = 5. (d) Vz/VR = 8. (e) Vz/VR - infinite. 84 1. (b) which the Fourier amplitudes peak (lobe), broadens. If the velocity is supposed to be positive, the larger the ratio, the more the lobe spills into the negative k region of the graph (it would be just the opposite if the velocity were supposed to be negative). This continues until the lobe is divided in half, when the ratio is infinite (i.e. Vz is finite, and VR - 0, analyzing for VR, and vice-versa). Shot 1120224015 Shot 1120224027 150 150 >1 100 >100 LA_ 50 50 -6 Sh ot -4 0 2 -2 k. (cm~') 4 6 -6 1120224022 Shct 150 150 0> 100 C 100 50 50 -6 -4 -2 0 2 ke (cm-') 4 6 -4 -2 0 2 k8 (cm~') 4 6 1120224022 L -6 -4 -2 0 2 ke (cm~') 4 6 Figure 6-9: Examples of spreads in lobes of poloidal conditional spectra for real shots in the far scrape-off-layer (p > 0.85 cm). (top) Two lobes on opposite sides of the k-spectrum. The separation of the two lobes is much too wide compared to the synthetic spectra where the separation is due to a significant component in the perpendicular direction. (bottom) Spread in lobes (one dominant direction) which indicates that there may be a radial component for this shot. However, very few real shots had significant width to the lobes in their poloidal spectra, indicating small radial components. 85 While the tracking TDE finds the radial velocities of real shots to be small compared to the poloidal velocities, additional assurance would be provided if we could find another independent way of determining an upper limit on the radial velocity in order to evaluate how much of an effect any radial component will have on the Fourier measurements of the poloidal velocities. Using what was shown in Figure 6.8, we have examined the measured poloidal velocities of real shots from,[3 looking for instances in which there are broadened lobes, and lobes split between negative and positive k values in the conditional k-f spectra from the Fourier analysis. Some examples are shown in Figure 6-9. There were very few instances in which there were broad lobes. There were several instances in which there appeared to be lobes split between positive and negative wavenumbers. However, in these cases, if we compare the separation of the split lobes in the real data to the separation of the split lobes in the synthetic data, the split lobes in the real data are much further apart (Figure 6-9). This indicates that for these cases the lobes in opposite directions are not likely due to a significant radial component, but are actually two separate lobes. We have also independently analyzed for the radial velocities in the real data, by modifying the Fourier code to handle the horizontal direction. The wavefront model still applies, but in this case applying the radial form of Equation 6.5. We have done this solely for the SOL; the region inside the separatrix in the Phantom Camera field of view for each shot was not included in the Fourier spatial transform. This ensures that there is no issue with the results due to crossing the separatrix when performing the summation in the transform. In almost all cases examined, the radial conditional spectrum yielded no measurement (Figure 6-10). This is due to the fact that the radial component is most likely too weak to be detected above the noise level. These analyses strongly support our belief that the radial phase velocities, in general, are small compared to the poloidal phase velocities, and that little, if any, correction is necessary for the Fourier analysis. As was demonstrated in the previous section, the corrections to the tracking TDE code, made only a slight difference in the poloidal velocity measurement in a few cases, and essentially no difference in most 86 Shot 1120224009 150 100 50 -6 -4 -2 0 2 kr (cm~') 4 6 Figure 6-10: Sample radial conditional spectrum for shot #1120224009. cases. Thus, we conclude that the reasons for the discrepancies in results between these two techniques must be due to some other causes. We explore these other causes in the next chapter. 87 88 Chapter 7 Resolution of the velocity discrepancies 7.1 Revisiting the original problem and where we are so far We began this thesis by presenting recently published data [31 in which the poloidal velocities of turbulent filaments in the boundary of C-Mod plasmas were presented as a function of distance from the separatrix. Using a method which we have called tracking Time-Delay-Estimation, the Zweben paper analyzed data from the Gas Puff Imaging system which employs the Phantom Camera as a detector. As described in Chapter 4, this method finds the maxima in the cross-correlation function for an array of time lags between the time series for a reference location in the Phantom Camera image and the time series from other locations in a search box surrounding the reference location. The velocities computed for each time lag are then aver- aged to obtain a final velocity for the emission structures, at that reference location. We contrasted the velocities computed in this way with those computed using another method, which uses temporal and spatial Fourier analysis, from which we produced conditional wavenumber-frequency spectrograms as described in Chapter 3. The Fourier analysis finds poloidal phase velocities of emission structures using those 89 spectrograms. As shown in Figure 2-1 (repeated here as Figure 7-1) and emphasized in Chapter 2, these velocities do not agree, with discrepancies of up to an order of magnitude for the same data. The goal of this thesis has been to understand and resolve these discrepancies. Shot #1 12G224009 Shot #1120224015 4 -A (a) A 2 A AN. E M b 1 (3 E V -V V ai V V A -1 0 -2 A 0.0 -05 AL D5 1. -1 S -05 -1.0 05 0.0 1.0 PhD (-cm) Shot # 1120712027 A AL A hD (cm)2 Shot #1120515016 4 A (d) 3 3 2 E E a -it A AL -2 -- --- -1 5 -10 D D A A A A 0.5 1.0 A -1 A -0.5 A A -- -- -- -- ---AA A 2 -U 0.5 A A 5 -1.0 -0.5 00 RhD RhD (Cm) (cm) Figure 7-1: Poloidal velocity measurements for four Alcator C-Mod shots, using Fourier analysis (red triangles) and tracking TDE (blue inverted triangles). In Chapter 5, we presented our method for studying this issue, i.e. the use of synthetic data for which we know the velocities, sizes, intensities, and distributions of the emission structures ("blobs") before analysis. This allowed us to test each method and code for their individual strengths and weaknesses, as well as systematic issues. The systematic issues that were found are described in Chapter 6. Overall we found that the Fourier analyses correctly returned the poloidal velocities of the structures in the synthetic image sequences as long as the ratio of radial to poloidal velocity <0.7. This condition appears to be satisfied in the experimental data, based 90 on the very small values of the TDE-determined radial velocities and based on radialvelocity Fourier analysis for the shots. Affecting the tracking TDE determinations were two significant issues. First, if the maximum in the cross-correlation function is at the edge of the search box for a reference pixel (meaning that the center of a blob has already passed out of the box), it was still used in the average over time lags. Second, cross-correlations above the threshold value at four different time lags were required for inclusion in computing the detected velocity, thus limiting the maximum detectable velocity to a value well below the quoted maximum of ±2.8 km/s. To address these two issues, we modified the analysis code so that time lags for which the maximum in the cross-correlation function is at the edge of the search box are not included, and so that the cross-correlation above the threshold is required at only one time-lag for inclusion. With these changes the TDE analysis returns velocities that are within 10% of the velocities in the synthetic image sequences as long as there is only one velocity field and as long as the maximum velocity does not exceed -2.8 km/s. However, even with these changes to the tracking TDE analysis, most of the discrepancy between the results of the two analyses remains. Thus, accounting for these systematic effects was not able to explain the original discrepancies. With the knowledge that analysis methods do return the appropriate velocities under the restricted conditions discussed above, we are forced to examine the details of the Fourier spectrograms in search of a resolution for the remaining discrepancies. Using the spectrograms we will explore the evidence and impact in the analyses of multiple velocities existing within the field-of-view, including non-zero dispersion in w(k). These were mentioned previously (Chapters 2, 3, and 4) as possible problems. 7.2 Analysis for dispersion in the real data The first issue is dispersion in the plasma. have dispersion when w/k Mathematically, we can detect if we # dw/dk; the phase velocity does not equal the group velocity. This can manifest itself in different ways. First, dw/dk could be a continuous function in which the group velocity changes gradually. 91 Second, dw/dk could be discontinuous, meaning that the group velocity changes abruptly. We will treat the first case immediately and discuss the second case later in this section. Physically, dispersion in this case would mean that different size structures move at different velocities. As mentioned before, the presence of dispersion leads both codes to output incorrect values of the poloidal velocities of the emission structures since there is no single velocity for all features. For the Fourier analysis, this is obvious since it relies on the principle that a straight line can be fit to the peaks of the conditional spectrum (through zero), and that the slope of the line is the phase velocity. A changing slope implies dispersion. In the tracking TDE code, the presence of continuous dispersion is more subtle, because the tracking TDE method relies on finding the maximum in the cross-correlation function and heavily weights the most intense features. Typically, the most intense features are in the low-frequency, low-wavenumber range. This can be seen by looking at a sample wavenumber-frequency spectrogram, such as the one shown in Figure 3-1 (reproduced here as Figure 7-2). Note that the color scale is the log of the spectral power. $hc4t 1 251$03i I 1,2.8" thrW ~. Z .4 I .263& 04.A 1111811 4-~~ 8 4 23 t -2 - OUQO 0 thru 2 O0044 s- 4 6 Figure 7-2: Sample wavenumber-frequency spectrogram for a real shot (a) and a synthetic one-velocity shot (b). The color scale indicates the log of the power (square of the absolute value of the Fourier coefficients) at a given wavenumber and frequency. The simplest way to check for dispersion is to examine the conditional spectra from the Fourier analysis for curved lobes. This, we have done. Figure 7-3 shows an example of a clear curved lobe (dw/dk continuous) in the sample of shots published 92 in the Zweben paper. 150 -4 -6 -2 0 2 6 4 k. (cm) Figure 7-3: Poloidal conditional spectrum for C-Mod shot #1120224015. The spectrum features a curved lobe indicating some dispersion in the plasma at p = -0.65 cm. S it 120224024 t- 1.13W0t 1.134 .. Sht 1120224009 c .0 1 00 C (D 100 50 i U. -6 -4 -2 0 k* (cm') -4 -2 0 2 4 6 ko (CMr') 2 Figure 7-4: (a) Conditional spectrum for Shot #1120224024, p = -0.1 cm. An abrupt break in slope is clearly observed. Two slopes are shown: one for a slower-moving component, and one for a fast moving component. (b) Conditional spectrum for Shot #1120224009, p = 1.0 cm, also showing a clear break in slope, slower phase velocity (~0.6 km/s) for the lower frequency/lower k features and a faster phase velocity (~.3 km/s) for the higher frequency features. The solid white line is the velocity obtained from maximum-in-the-integral-computation. Now let us consider the second kind of dispersion, in which the slope of the lobe in 93 a conditional spectrum abruptly changes. There are instances of this kind of dispersion in the real data, as well. Examples are shown in Figure 7-4 for shots #1120224024 and #1120224009, with the fitted velocities included. Note that the fitted line for the higher-frequency, higher-wavenumber component does not go through the origin. Producing a clearly curved lobe in the synthetic data was extremely difficult. However, we were able to produce two synthetic shots in which the velocity appears to change quickly ("split-slope") as a function of frequency. The conditional spectra for these shots are shown in Figure 7-5. The input velocities for these synthetic shots S~W -10 111161119 -5 t- 0.9000 thru 0,9046 ftc 0 5 I111161118 SW -10 10 -5 t -0.9000 0 thru 0,9046 sc 5 10 k. (cm-! ko (Cm') Figure 7-5: Conditional spectra for synthetic shots constructed in order to show a break in slope. The red dashed line is the hand fit for frequencies < 30 kHz and yields a velocity of -0.75 km/s. The dark green line indicates the slope of the slower-moving feature (with a phase velocity - = -0.75 km/s) while the lighter green dashed line indicates the slope of the faster-moving feature (-1.15 km/s). Input values for these shots are given in Table 7.1. (a) Uses only two fields, and (b) uses four fields. are listed in Table 7.1. The important result of the test analysis is that the tracking TDE analysis returns poloidal velocities of -0.51 km/s and -0.61 km/s, respectively for these synthetic cases, obviously weighting the lower frequency more heavily than the higher frequency ones. 94 Field Field Field Field Field Vertical Velocity 1 2 3 4 Field 5 Field 6 Horizontal Velocity FWHM Synthetic shot #111161118: Four-field shot -0.59 0.31 0.8 -0.82 0.27 0.8 -1.09 0.23 0.4 -1.21 0.27 0.4 Synthetic shot #111161119: Two-field shot -0.59 0.31 0.8 -1.13 0.27 0.4 Max Intensity 3.0 2.7 1.1 1.1 3.0 0.7 Table 7.1: Input values for two synthetic shots which show breaks in slope. Velocities are given in km/s, FWHM are given in cm, and max intensity in arbitrary units. The TDE analysis returns poloidal velocities of -0.51 km/s and -0.61 km/s respectively for these synthetic cases, obviously weighting the lower-frequency components more heavily than the higher ones. 7.3 Analysis for the effects of multiple lobes within the field of view The second issue we mentioned previously (Chapters 2 and 4) is that of multiple flows in the same region. It is already known that the tracking TDE cannot distinguish between multiple flows in the same region; the best it can do is provide a weighted "average" velocity for the region. Because the Fourier analysis breaks up the signal into its individual components and does not only select the brightest part of the signal, it can detect multiple flows in a region. We have already shown this for two flows with the same sign in velocity (Figure 5-5). However, it is certainly possible that these flows can "blend" together to appear as though they are the same one. Figure 7.6 shows three more synthetic examples in which there are multiple flows in the same region. See Table 7.2 for the inputs. These inputs were chosen so that the poloidal conditional spectra would produce one or two blended lobes while the number of input fields was actually three or four. We obtained the poloidal velocity as measured from both the Fourier and the tracking TDE analysis. The results are listed in Table 7.3. If the four-field shot is treated as a single-lobe by the Fourier analysis, and we only return a single velocity 95 Sy U.-L -- c" g k4()4 4-20246-6 -4 0 -2 2 4 6 Synthetic shot 1161117 1150 ~ ~ 00 tikPO 0 k (cm)k")(m' -2 0 1 ~50£ LL -8 -4 2 kPO1 (Cnf 1 ) 4 8 Figure 7-6: Poloidal conditional spectra for four-field (a) and three-field (b and c) synthetic shots. The negative-k lobes appear blended. Both a maximum-integral computational fit (solid white line with the Vp, value) and hand fits (dashed red lines) were completed for these cases, and are consistent with the input values given in Table 7.2, although only 3 of the 4 velocities of four-field case are resolved. Field Field Field Field Field 1 2 3 4 Vertical Velocity Horizontal Velocity FWHM Max Intensity Synthetic shot #111161115: Four-field shot -1.95 -1.37 -0.98 -0.82 0.39 0.39 0.39 0.39 Synthetic shot #111161116: Field 1 Field 2 Field 3 -1.95 -1.29 0.19 0.39 0.39 0.08 Synthetic shot #111161117: Field 1 Field 2 Field 3 -1.95 -1.29 0.78 0.39 0.39 0.08 0.4 0.4 1.0 1.0 2.3 2.2 2.7 3.0 Three-field shot 0.4 0.6 1.0 2.5 1.9 1.3 Three-field shot 0.4 0.6 1.0 2.5 1.9 1.3 Table 7.2: Input parameters for three multi-field synthetic shots. Velocities are measured in km/s, FWHM in cm, and intensity in arbitrary units. The input velocities are to be compared with the features and fits in the conditional spectra of Figure 7.6 and the tracking TDE velocities listed in Table 7.3. 96 using the maximum-integral computational fit, then the returned velocity is -1.4 km/s as listed. Each three-field shot has two negative-k lobes and one positive-k lobe. Again, if the Fourier analysis is used to return only a single velocity for each direction, then the two found velocities are as listed. Vp,, (Fourier) Vp,, (TDE) 111161115 -1 -0.86 111161116 0.2 -1.9 0.13 111161117 1.9 -0.11 - 0.88 - Synthetic shot - Table 7.3: Fourier and tracking TDE results for the synthetic shots given in Table 7.2. All velocities are in km/s. The last case shown in Figure 7-6c and listed in Table 7.3 demonstrates how discrepancies of up to an order of magnitude and even direction might arise from a multi-field signal, moving mainly in the poloidal direction. The Fourier analysis yields a maximum-integral-computational velocity of -1.9 km/s, with obvious additional lobes of -1.36 and 0.88 km/s. These correspond quantitatively with the input velocities of -1.95, -1.29, and 0.78 km/s respectively. However, the tracking TDE analysis yields a poloidal velocity of -0.11 km/s. Thus, in this case, the disagreement is by a factor of more than 10 for the negative-k lobes, and in the opposite direction for the positive-k lobe. Its magnitude is a factor of 9 smaller than the actual positive-k input velocity. After thoroughly examining the conditional spectra for the shots published in 131, there are many instances in which there are multiple flows in the real data, many with both positive and negative-k lobes. One is shown in Figure 7-7. 97 Shot 91120224027 t a 1.1440 thru 1.1474 sec 150 -4 -2 0 k* (cm') 2 4 Figure 7-7: Conditional spectrum for shot #1120224027, at p--0.72 7.4 A resolution We have modified Figures 2-1 and 7-1 in light of this more detailed analysis of the Fourier conditional spectrograms. The modified presentation is shown in Figure 7-8 a-d. We have observed that the multiple flows are manifested in two different ways. In some cases there appear to be flows moving in opposite directions. For other cases (which we have examined as non-zero dispersion cases), there appears to be a single lobe actually composed of two or more velocities. We have designed a synthetic data set, whose conditional spectra are shown in Figure 7-4, to have the rough appearance of the non-zero dispersion case, as an example. In this synthetic case and in those cases of actual data with a break-in-slope lobe, we have found that the TDE analysis returns a velocity that is much more heavily weighted to the lower-f/lower-k part of the spectrum. To arrive at the results of Figure 7-8, we considered each shot carefully. First for shot #1120224009, Figure 7-9 (a-e) are the conditional spectra from the Phantom Camera for Figure 7.8a. As can be seen in (a-d), the Fourier analysis yields two lobes in opposite directions at each location in p (-0.81, -0.35, 0.1, and 0.55). In addition, the positive lobe in each appears to have two relatively distinct slopes. For the spectra at p - 0.55 and 1 cm (Figures 7.9d-e), the lobes with positive wavenumbers 98 Shot #1120224009 Shot #1120224015 1.5 4 1.0 A 2 U A A 0.5 A A AV (b) 0.G ------------------- -- 9' A VA c #6 -0.5 VA A -2 -10 A_ -0 5 Shot A 0.0 VA A D5 A 1.0 i -0.5 -1G 0.0 1 0 G15 rho (Cm) rho (Cm) #1120712027 Shot #1120815018 4 :6 A (d) e- .2 A E A A 2 A A 0.5 1.0 A A -. 9 -1 [ A A A 5 -1.0 -05 D0 -1 1 -15 0.5 -1.0 -0.5 rho (Cm) 00 rho (cm) Figure 7-8: Figures 2-1 and 7-1 modified after considering the presence of multiple flows and non-zero dispersion. Again the blue triangles are using the tracking TDE after applying the corrections discussed in Chapter 6. The larger red triangles are the velocities from the Fourier analysis that were hand-fitted to the lower frequency/lower k parts of the dominant lobes in the conditional spectra. The smaller triangles are the hand-fitted velocities for lobes in the conditional spectra that were present but not dominant or were present at the higher frequencies. are clearly dominant. However, these dominant lobes have a clear break-in-slope: one representing slower motion (for low f and k), and one at higher f and k indicating faster motion. These cases are examples of non-zero dispersion. The slower-moving component has larger Fourier coefficients and is dominant. Looking back at Figure 7-8a, we can now understand the discrepancy for this shot. First, the tracking TDE code is finding some weighted average velocity for the region. For the first three points (p = -0.81, -0.36, 0.10 cm), this "average" is over the two components moving in opposite directions, as well as the split slopes. The tracking TDE poloidal velocity measurement moves from negative to positive (while still staying around zero magnitude) as the lobes in the conditional spectra 99 Shot 1120224009 Shot 1120224009 N150 N150 )00 2100 0) so0 2,)50 LL WA. -6 -4 -2 0 2 kPW (cm1 ) 4 6 -6 -4 -2 0 2 4 6 4 6 kPW (cm') Shot 1120224009 Shot 1120224009 150 %.0 100 90 U.5 U_ -6 -4 -2 0 2 4 6 -6 -4 kW (cm~') -2 0 2 k,,. (cm') Shot 1120224009 N150 100 50 UL -6 -4 -2 0 2 4 6 ka (cm-') Figure 7-9: Poloidal conditional spectra for shot #1120224009. Shown for each point in Figure 7-8a are fits to the lobes in the spectra. (a-c) have two lobes in the opposite directions while (d,e) have non-zero dispersion (a slower-moving component at low k, low f with a faster component at higher k and f). move from being more dominant in negative wavenumber to being more dominant in positive wavenumber. For the Fourier points at p = 0.55 and 1.0 cm), we have split up the measurement we made for Figure 2-1a (7.1a) into two separate velocities 100 to reflect the non-zero dispersion. The slower-moving component in this region now agrees with the measurement made by the tracking TDE (p - 0.75). This confirms that the tracking TDE method is finding the dominant component, which is usually the component with lower f and lower k. Figure 7-10 (a-e) show the conditional spectra for shot #1120224015. At p - -1.11, -0.65, -0.20, and 0.25 cm, there appears to be only one negative-k lobe. We have fitted by hand the velocities of these lobes at frequencies <30 kHz, where the Fourier amplitudes are largest. We can see that these hand-fits at low frequency yield somewhat smaller velocities than the maximum-integral-computational ones that were plotted in the original Figure 2-1 and 7-1. Looking back at Figure 7-8b, we can see that with this fitting criterion the discrepancy is now mostly resolved between the Fourier analysis and the tracking TDE. The corrections in Chapter 6 made non-significant changes to the outputs from the tracking TDE; those are reflected in Figure 7-8b as well. Moving to the outermost scrape-off layer point at p - 0.7 cm (Figure 7-10e), we can see that there is now a second lobe in addition to the first, moving in the opposite direction. Indeed at this location the Fourier and the TDE results no longer agree, and we conclude that for this location, the discrepancy can be resolved by recognizing that the tracking TDE code is taking a weighted average of the two features. The tracking TDE analysis finds a small positive velocity in this case, even though the negative-k lobe appears to dominate the Fourier spectrum. For shot #1120712027, at p - -1.37 cm and -0.92 cm, we note the presence of the quasi-coherent mode (at k - 2 cm- 1 and downward (split-lobe with two slopes). f = 100 kHz), and another feature moving The QCM has a fast phase velocity that is beyond the detection limit of the TDE analysis. Moving towards the separatrix and into the scrape-off-layer, the QCM disappears, leaving only the feature moving downward, which still appears to be split into two slopes. This feature now appears more spread out, in a similar fashion to the lobes shown in Figure 6.9, indicating a possible radial component to its motion. We attempted to verify that there is a radial component and were unable to do so because the Phantom Camera frames did not include enough of the SOL layer to obtain a meaningful measurement of the 101 Shot 1120224015 Shot 1120224015 N150 N150 100 100 0)D 950 LL 50 U -6 -4 -2 0 2 4 6 -6 -4 ko (cm") -2 k Shot 1120224015 0 2 4 6 2 4 6 (cm') Shot 1120224015 N150 N150 100 00 a)a 950 50 6 -4 -2 0 2 ka (cm1 ) 4 6 -6 -4 -2 k 0 (cm") Shot 1120224015 150 '100 950 h6 4 -2 0 2 kM (cm' 1) 4 6 Figure 7-10: Poloidal conditional spectra for shot #1120224015. Shown for each point in Figure 7-8b are fits to the lobes in the spectra. Hand fits to the velocity for f ,30 kHz are shown in red, while a computational fit is shown in white. radial phase velocity in that region. Comparing the spectra in Figure 7-11 to those in Figure 6-9, it is certainly possible that if there is a radial component, it is likely to be comparable in magnitude to the poloidal component, if not slightly larger. This radial component would increase the magnitude of the poloidal phase velocity by a 102 ISO.- 150 . 50 -6 -4 -2 ho S"o 01120712027 0 (2) 2 6 4 -6 k . 1.44M0 11W 1.4434 2ft -4 -2 S"o P 120712027 0 2 k7 (CM4) 4 6 t - 1.4400thna 1.4434 *ft 150 IDO 50* -6 -4 -2 0 k () 2 SWo 6 4 -4 -6 -2 0 2 4 5 I 1.4434 sec #1120712027 150 -6 -4 -2 kO 0 (cm') 2 4 6 Figure 7-11: Poloidal conditional spectra for shot #1120712027. factor of -2. The tracking TDE (corrected) found velocities slightly smaller than the smaller of the two velocities associated with the two slopes, in all cases. If we assume that there is a radial component for the first three Fourier points, the correction to the Fourier velocities would account for the difference. 103 Considering the last of the four shots, #1120815034, we can see immediately the origin of the discrepancy (Figure 7-12). At each location, there are lobes indicative Sho 1120615018 1.2734 sec t - 1.2700 thr Sho 120815018 - 1.2700 tw 1.2734 sec 100 50 -6 -4 Sho #1120815018 -2 0 k# (-"') 2 4 1 0 1.2700 tI -6 6 1,2734 se -4 -2 0 k# (c-') t Shot #1120815018 2 4 6 12700 thn 1.2734 sec ISO 200 50 -6 -4 -2 0 4 2 6 k. (Oi2M-) Shot #1120815018 -6 t - 1.2' k9 0 2 (cm-1 -2 -4 0 k. (cmt*) 2 4 5 2SO 100 50 -6 -4 -2 4 6 Figure 7-12: Poloidal conditional spectra for shot #1120815018. of motion in opposite directions. At p - -0.82 and -0.37 cm, we can see the QCM, which has a fast poloidal phase velocity, as well as a slower moving lobe indicating 104 downward motion. Eventually the QCM is replaced by another positive lobe moving somewhat slower. Looking back at Figure 7-8d, the tracking TDE code is taking some average of these lobes, but favoring the positive ones since they are somewhat more intense. Finally, we consider APD measurements for one of the shots we showed in Figures 7-8, #1120815018. In Chapter 3, we discussed that while the APDs and Phantom Camera showed qualitatively the same features, in some cases the measured wavenumbers and phase velocities were not exactly the same. Figure 7-13 is a profile of the poloidal velocity versus p, derived using the Fourier analysis on both the APD and the Phantom camera data. As shown, while the velocity measurements are not exactly the same, they are in good agreement. Shot #1120815018 4 V E2 A V -1.0 -0.5 0.O 0.5 1.0 rho (Cm) Figure 7-13: Poloidal velocity vs. p for C-Mod shot #1120815018, comparing the data from the APDs (blue) to the data from the Phantom Camera (red), using the Fourier technique, as the tracking TDE code is not designed for use with the APDs. The meaning of the small and large triangles is the same as described in Figure 7-8. These measurements are generally in agreement. 7.5 Summary and conclusion The focus of this thesis was to understand why two different analysis codes for determining the poloidal velocities of emission structures captured with GPI yield results 105 differing up to an order of magnitude for the same data. Chapter 1 introduced the Gas Puff Imaging diagnostic as well as the two detectors we use to collect the data from it: the Phantom Camera and the avalanche photodiodes (APDs). The data considered in this thesis were taken mainly with the Phantom Camera. Chapter 2 provided the motivation for this work, as illustrated in Figure 2.1 which shows the discrepancies in the results from the two codes. Chapter 3 discussed in detail the first code, [1, 2] which uses temporal and spatial Fourier transforms to create (among other things) conditional wavenumber-frequency spectra from the time signals for which the poloidal phase velocities of the emission structures can be extracted. Chapter 4 then described the second code, [3, 4] which employs a hybrid of pattern tracking and time-delay-estimation. It works by finding time-delayed cross-correlations between spatially separated locations in the images. In Chapter 5, we described how we chose to address this issue: by generating synthetic data that mimics the real data. We used the synthetic data to test each code rigorously. As part of those tests, we identified some issues which could lead to errors in the determinations of the desired poloidal velocities; these issues are described in Chapter 6. However, after accounting for these issues, either by modifying the analysis (in the tracking TDE case) or by determining that the assumption Vz >> VR is justified (in the Fourier case), it was shown that these issues did not resolve the original discrepancies. In this Chapter, we have examined the Fourier spectra in detail, considered the "weighting" that each analysis uses in its calculation, and concluded that the discrepancies are mostly due to two reasons. First is the presence of multiple velocities in the same field of view that are either "averaged" in some way by the tracking TDE analysis or weighted differently by each analysis, so that the velocity that dominates the tracking TDE analysis result is not necessarily dominating the Fourier-derived result. And second is the presence of non-zero dispersion in the propagation of the emission structures and again a difference in weighting by the two analyses under these conditions. We will leave the reader with a few words on the use of these codes. These two codes are looking at different properties of the emission structures. The tracking TDE code returns a single velocity that is associated with the largest and typically 106 brightest features, while the Fourier analysis allows examination of multiple-size and time-scale features. It is appropriate to use the tracking TDE method when one wants to study how the largest features move. It is not appropriate to use when one wants to study multiple size- and time- scales of the turbulence; one can use the Fourier method for this. The most information will be gained when using both methods on the same data with caution and with understanding of what is being measured by each. 107 108 Appendix A Codes to generate synthetic data Construct__fakeblobs.pro - generates synthetic data for APDs Construct _fakeblobs_ phantom.pro - generates synthetic data for Phantom Camera /home/terry/idl-lib/gaussian-lD.pro 0/home/sierchio/readcol.pro @/home/sierchio/remchar.pro 0/home/sierchio/gettok.pro 0/home/sierchio/strnumber.pro @/home/terry/idl-lib/cmreplicate.pro @/usr/local/cmod/codes/spectroscopy/gpi/write-phantom-t-hists.pro @/home/terry/gpi/phantom/get-phantom-data.pro pro construct-fake-blobs-phantom,normal=normal,tree-write=tree-write, addnoise=addnoise input variables and options normal = 1 allows the user to select from a normal distribution instead of a gamma distribution tree-write allows user to write the shot to the tree for future use addnoise allows the user to add a real noise background to each 109 frame using a non-plasma C-Mod shot, #1120712007 steps = the number of the time steps the user wishes to run for. 2000 steps will give roughly 5 ms of data. num-fields = number of fields the user wishes to include in the total field, essentially the number of sets of parameters the user wishes to include. This must be decided before running. variables for each field Vp = input vertical velocity, measured in km/s Vr = input horizontal velocity, measured in km/s intensity = maximum intensity a single blob is allowed to have (usually 3.0 is adequate, especially if running multiple fields) FWHM = full width half max of the blobs, measured in cm. For an intensity of 3.0, the max FWHM for gamma=9 is 1.2 cm. gamma = the gamma parameter for the gamma distribution print,'enter time steps and number of fields' read,steps,num-fields fields-arr=fltarr(num-fields,64,64,steps) keydefault,normal,0 for w=0,num-fields-1 do begin start: frames1=fltarr(64,64,steps) print,'enter phVp (km/s), phVr (km/s), intensity, FWHM,gamma' print,'Do NOT input both Vp=0 AND Vr=0' read,Vp,Vr,intensity,fwhm,gamma around 70 blobs will cover the surface for an intensity of 3.0 and FWHM of 0.8 cm. To get the best coverage and signal for a single field, it is recommended that the user run a single field 110 at least twice. This will ensure that as few pixels as possible will have zero signal in them at any given time. Double or multiple fields in the same shot only need to be run once for each set of parameters. parameters necessary for writing to the tree, such as trigger time, frame rate, clock, time, and segment size are taken from shot #1120911021. The trigger time is currently 0.9 s. vratio=Vp/Vr x=sqrt(Vp^2+Vr^2) counter=1 counter2=3 mdsopen,'spectroscopy',1120911021 r_arr=mdsvalue('\SPECTROSCOPY::TOP.GPI.PHANTOM.IMAGEPOS:R-ARR') z_arr=mdsvalue('\SPECTROSCOPY::TOP.GPI.PHANTOM.IMAGEPOS:Z-ARR') time=mdsvalue('dim-of(\SPECTROSCOPY::TOP.GPI.PHANTOM:THISTS)') segsizeo=mdsvalue('getsegmentinfo(\SPECTROSCOPY::TOP.GPI.PHANTOM:$ frames,0,*,_dimct,_dims,_nrow),_nrow') exp=mdsvalue('\SPECTROSCOPY::TOP.GPI.PHANTOM.SETTINGS:EXPOS') frame.rate=mdsvalue('\SPECTROSCOPY::TOP.GPI.PHANTOM.SETTINGS:$ FRAMERATE') clock=mdsvalue('\SPECTROSCOPY::TOP.GPI.PHANTOM.SETTINGS:$ FRAMECLOCK') numframes=mdsvalue('\SPECTROSCOPY::TOP.GPI.PHANTOM.SETTINGS:$ NUMFRAMES') ncols=mdsvalue('\SPECTROSCOPY::TOP.GPI.PHANTOM.SETTINGS:XPIX') n-rows=mdsvalue('\SPECTROSCOPY::TOP.GPI.PHANTOM.SETTINGS:YPIX') trig-time=mdsvalue('\SPECTROSCOPY::TOP.GPI.PHANTOM.SETTINGS:$ 111 TRIGTIME') mdsclose back.filename='/home/terry/gpi/phantom/$ phantom-background-exp_2us.sav' restore,file=backfilename,/verb back-shot-num=1120712007 Vp=Vp*100000.0 ;converts from km/s to cm/s Vr=Vr*100000.0 delta-t=1.0/frame-rate ; sec pixstep=delta-t*10000000.0 blob-params=fltarr(30000,5) ;for each blob, stores r,z coordinates, max intensity, radius Height.pix=1907 Width-pix=1877 field=fltarr(1548,1578) z_field=-11.87+0.01*indgen(1578) r-field=98.47-0.01*indgen(1548) tot-field=fltarr(width-pix,height-pix) blob-params[*,0]=fwhm blob-params[*,11=150.0 blob-params[*,21=-60.0 if normal then begin blob-params[*,31= (3.+RANDOMN(SEED,30000,/normal) > 0.01) siggauss=(blob-params[*,3]/3.)*blob-params[*,0]/$ sqrt(8.*0.693) blob.params[*,4]=3*siggauss endif else begin blobparams[*,3]= intensity/gamma*RANDOMN(SEED,30000,$ 112 gamma=gamma) sig-gauss=(blob-params[*,3]*blob-params[*,0]/intensity)/$ sqrt(8.*0.693) blob-params[*,4]=3*sig-gauss endelse z-dum=([fltarr(1548)+1.1#zjfield) r-dum=r-field#[fltarr(1578)+1.1 ttl=systime(1) new=0 ttl=systime(1) mdsopen,'spectroscopy',1120911021L r-arr=mdsvalue('\SPECTROSCOPY::TOP.GPI.PHANTOM.IMAGEPOS:$ R_ARR') z_arr=mdsvalue('\SPECTROSCOPY::TOP.GPI.PHANTOM.IMAGEPOS:$ Z_ARR') mdsclose r-index=where(r-arr GT 0) z-index=where(z-arr LT 0) huh=array-indices(r-arr,r-index) time=fltarr(steps) view=lonarr(4096) FMT='L' fname='/home/sierchio/viewrad-phantom.txt' readcol,fname,view,F=FMT,/sil t=0 t=float(t) 113 fillfactor=fltarr(steps) loadct,45,/sil This is just an example to show what the code looks like for a particular chosen direction. The other three directions are included in the code in /home/sierchio if (Vp GE 0.0) AND (Vr GE 0.0) then begin tot-field[0:1547,0:15771=field newz=-7.56+0.01*indgen(756) new-r=93.16-0.01*indgen(756) for t=0.0,steps-1 do begin time[t]=t*deltat+trig-time ;loop to add up signal in pixels and store in frames for i=0,4095 do begin fields-arr(w,huh[0,i] ,huh[1,i],nint(t))=field(view[i]) endfor totfield[nint(pixstep*Vr/100000.0):1547+nint(pixstep*Vr/$ 100000.0),nint(pixstep*Vp/100000.0):1577+nint(pixstep*Vp/$ 100000.0)1=field field=0 blob.params[*,1]=blob-params[*,1]-Vr*delta_t blob-params[*,21=blob-params[*,2]+Vp*delta_t tot-field[1548:*,*]=0 tot-field[*,1578:*]=0 field=tot-field[0:1547,0:15771 if (t MOD counter EQ 0) then begin blob-params[new,11=93.9 Ad A6 A ;-(3-blobparams[new,41) blob.params[new,2]=new-z(nint(755* RANDOMN(SEED,$ /uniform))) 114 smallrdum=sqrt((r-dum-blob-params[new,11)^2+(z-dum-$ blob-params [new ,21) ^2) r_ind=where(smallr-dum lt blob-params[new,41) intens=gaussian_1D(smallr-dum(r-ind),[blob-params[$ new,31,0,blob-params[new,41/3.1) field(r-ind)=field(r-ind)+intens new=new+1 blob-params[new,1]=new-r(nint(755* RANDOMN(SEED,/uniform))) blob-params[new,2]=-7.1 ;+(3-blob-params[new,4]) smallr-dum=sqrt((r-dum-blob-params[new,1])^2+(z-dum$ -blob-params[new,21)^2) r-ind=where(smallr-dum lt blob-params[new,41) intens=gaussianiD(smallr-dum(r-ind), new,3],0,blob-params[new,41/3.1) field(r-ind)=field(r-ind)+intens new=new+1 endif totfield[0:1547,0:15771=field endfor endif endfor tree1: stop frames=total(fields-arr,1) test-shot=OL ans=OL maxf=max(frames) tlen=n-elements(time) if keyword-set(addnoise) then begin 115 [blob-params[$ get-phantom-data, back_shotnum,back-frames,back-timesexp,$ nsegl=O,nseg2=40,/silent frames=UINT((frames/max-f*275)+back-frames(*,*,O:tlen-1)) endif else frames=UINT(frames/max-f*1000+cmreplicate(back,tlen)) THE REVERSE IS IMPORTANT BECAUSE THE IMAGES ARE STORED MIRRORED ABOUT A VERTICAL AXIS make the max of the signal 1000 counts plus the "offset" or backgnd level if keyword-set(tree-write) then begin the rest of the code writes to the tree and is included in the version in /home/sierchio 116 Bibliography [1] I. Cziegler. Turbulence and transport phenomena in edge and scrape-off-layer plasmas. PhD thesis, Massachusetts Institute of Technology, 2011. 12] I. Cziegler et al. Ion-cyclotron range of frequencies in the scrape-off-layer: fine structure radial electric fields. Plasma Physics and Controlled Fusion, 54:105019, 2012. 13] S. J. Zweben et al. Comparison of edge turbulence imaging at two different poloidal locations in the scrape-off layer of Alcator C-Mod. Plasma of Physics, 20:072503, 2013. 14] T. Munsat and S. J. Zweben. Derivation of time-dependent two-dimensional velocity field maps for plasma turbulence studies. Review of Scientific Instruments, 77:103501, 2006. [51 CEA. http://www-fusion-magnetique.cea.fr/gb/fusion/physique/configtokamak.htm, 2006. [6] J. M. Sierchio and J. L. Terry. Upgrade to the Gas Puff Imaging Diagnostic that Views Alcator C-Mod's Inboard Edge. In 54th Annual Meeting of the APS Division of Plasma Physics, Providence, RI, October 2012. American Physical Society. [71 Stewart Zweben et al. Edge turbulence flows at two different poloidal angles in Alcator C-Mod. In 54th Annual Meeting of the APS Division of Plasma Physics, Providence, RI, October 2012. American Physical Society. [81 M. Greenwald et al. Confinement and Transport Research in Alcator C-Mod. Fusion Science and Technology, 51:266. 2007. [91 Donald A. Gurnett and Amitava Bhattacharjee. Introduction to Plasma Physics, pages 2-3. Cambridge University Press, Cambridge, UK, 2005. 1101 Jeffrey Freidberg. Plasma Physics and Fusion Energy, chapter 1.3, pages 16-19. Cambridge University Press, Cambridge, UK, 2007. [111 X. Garbet et al. Turbulent Particle Transport in Magnetized Plasmas. Physics Review Letters, 91:035001, 2003. 117 [121 S. J. Zweben et al. Edge turbulence imaging in the Alcator C-Mod tokamak. Physics of Plasmas,9:1981, 2002. [131 0. E. Garcia et al. Burst statistics in Alcator C-Mod SOL turbulence. Journal of Nuclear Materials, 438:S180, 2013. 114] 0. Grulke et al. Radially propagating fluctuation structures in the scrape-off layer of Alcator C-Mod. Physics of Plasmas, 13:012306, 2006. [151 C. Theiler et al. Cross-Field Motion of Plasma Blobs in an Open Magnetic Field Line Configuration. Physics Review Letters, 103:065001, 2009. [161 J. L. Terry et al. Spatial structure of scrape-off-layer filaments near the midplane and X-point regions of Alcator C-Mod. Journal of Nuclear Materials, 390:339, 2009. 1171 J. L. Terry et al. Observations of the turbulence in the scrape-off-layer of Alcator C-Mod and comparisons with simulation. Physics of Plasmas, 10:1739, 2003. 118] D. P. Stotler et al. Neutral transport simulations of gas puff imaging experiments. Journal of Nuclear Materials, 313-316:1066, 2003. [19] D. P. Stotler et al. Progress towards the validation of models of the behavior of neutral helium in gas puff imaging experiments. Journal of Nuclear Materials, 363-365:686, 2007. [201 0. Grulke et al. Experimental investigation of the parallel structure of fluctuations in the scrape-off layer of Alcator C-Mod. Nuclear Fusion, 54:043012, 2014. 1211 R. Kube et al. Blob sizes and velocities in the Alcator C-Mod scrape-off layer. Journal of Nuclear Materials, 438:S505, 2013. 1221 Erwin Kreyszig. Advanced Engineering Mathematics, chapter 11, pages 478-529. John Wiley & Sons, Hoboken, New Jersey, ninth edition, 2006. [231 George Arfken. Mathematical Methods for Physicists, chapter 14, page 760. Academic Press, Orlando, Florida, third edition, 1985. [241 I. S. Gradshteyn and I. M. Ryzchik. Tables of Integrals, Series, and Products, page 1101. Academic Press, San Diego, CA, sixth edition, 2000. [25] W. Kaplan. Advanced Calculus, page 501. Addison-Wesley, Reading, MA, fourth edition, 1992. 126] Y. C Kim J. M. Beall and E. J. Powers. Estimation of wavenumber and frequency spectra using fixed probe pairs. Journal of Applied Physics, 53:3933, 1982. 127] A. W. Carlson. The distribution of fluctuation measurements within the randomphase model. Journal of Applied Physics, 70:4028, 1991. 118 128] G. Jacovitti and G. Scarano. Discrete Time Techniques for Time Delay Estimation. IEEE Transactions on Signal Processing,41:525, 1993. [291 R. Bracewell. The Fourier Transform and Its Applications, chapter Pentagram Notation for Cross Correlation, page 46 and 243. McGraw-Hill, New York, 1965. 1301 A. Papoulis. The FourierIntegral and Its Applications, pages 244-253. McGrawHill, New York, 1962. 119