Download Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
MSE analysis report 049
Description of analysis of PEM period; phase offset, and generation of
sinusoidal ‘reference’ waveforms
January 10, 2013
IDL procedure gen_pem_dtaqcq_verify.pro, which can be built using
gen_pem_dtaqcq_verify.com, is a modified version of
gen_pem_dtacq_rms.pro which is used by mse_analysis_isc_new.pro to
generate the sinusoidal ‘reference’ waveforms that are beat against the MSE
data to compute the FFT amplitudes at 20, 22, 40, 44, … kHz.
gen_pem_dtaqcq_verify.pro has some additional plotting capabilities that
were not present in the parent IDL procedure.
Also, during its short history gen_pem_dtaqcq_verify.pro has had a variety of
values for the parameter delta_tolerance. It started out as 2, which is the
current value in gen_pem_dtaqcq_rms.pro. Then I reduced it to 1, and this
was the basis for a number of early analyses of the PEM period for the
December 2012 calibration scans. But then I noticed that (I think it might
have been in actual data from the 2012 run campaign, but I’m not sure) there
were some shots for which a large number of PEM periods had a deviation of
say 1.1 microseconds from the average, and this was causing the PEM drive
signal (for 12 seconds, about 250,000 periods) into many small chunks,
whereas if the delta_tolerance were set to 1.5, most of the chunks would
revert to the usual 200,000 microsecond maximum. So most of the more
recent analyses were done with delta_tolerance = 1.5.
Identifying time indices when PEM drive goes from ‘low’ to ‘high’
Procedure compute_up_indices accepts as input the raw waveform of the
drive signal for each PEM. It computes an array of indices at which the
drive signal goes from a ‘low’ value to a ‘high’ value.
Figure 1. PEM drive signal for the 20 kHz PEM for shot 12121268111. A
low-to-high transition occurs when the drive signal goes from a ‘low’ state
to a ‘up’ state. A PEM period is defined as the difference between the
indices of successive low-to-up transitions. Most of the periods are the
same (within 1 microsecond of the mean), but particularly during the post2012 calibrations, there were many shots that had 30-80 periods (out of
250,000) that deviated significantly from the average.
The algorithm is based on the concept of the ‘state’ of the PEM, either
‘low’ or ‘up’. The rules are:

If we are currently in an ‘up’ state and the value of the waveform
for the current index and the next index falls below threshold_2,
then the state is changed to ‘low’. Otherwise, the state remains
‘up’. [ Originally, the rule was that the state would be changed to
‘low’ if the value of the current index fell below threshold_2, but
then we noticed that sometimes there would be a single-point
glitch during the top of the square wave, which led to the
requirement that 2 successive points must fall below threshold_2
for the state to change to ‘low’. ]

If we are in a ‘low’ state and the value of the present index
exceeds the value of ‘threshold-1’, then the state changes to ‘up’.

If the state changes from ‘low’ on index j-1 to ‘high’ on index j,
then the algorithm records a low-to-high transition at index j.
These indices are stored in array indices_up.

At the start of the algorithm, the PEM is assumed to be in the
‘up’state.
Figure yy. Computed period for the 20 kHz PEM for shot 1130146110.
The blue line is a linear fit to the ‘good’ periods, which are defined as
those having a period within 1.5 units of the mean. The red points
are the ‘bad’ periods. Note that some periods differ significantly from
the mean.
Figure xx. Computed PEM period (units = time indices, each time index is
close to 1 microsecond) for shots 1130146110 and 111. The blue line is a
linear fit to the ‘good’ periods, which are defined as those having a
period within 1.5 units of the mean. The red points are the ‘bad’ periods
for shot 110, and the green points are the ‘bad’ periods for shot 111. The
period nature of the occurrences of the ‘bad’ periods is evident.
Figure zz. First set of two bad periods in shot 1130146110. X-axis is
period number, and y-axis is period length.
Figure zz. Second set of bad periods in shot 1130146110.
The deviation from the average is much smaller than the first
set of bad periods.
Figure zz. Time history of the PEM drive near the first set of bad periods.
Constancy of the PEM period
Typically in gen_pem_dtacq_rms as used by mse_analysis_isc_new.pro,
the PEM waveform is broken into time-chunks of 200 ms, and the period
and phase of the PEM is computed in each 200 ms period.
To get a better understanding of the actual variability of the PEM period
over the course of a 12 sec shot, some extra software was written into
gen_pem_dtacq_verify.pro. It does the following:
1. The IDL routine compute_up_indices is called, to compute an
array that contains the time-indices of the ~250,0000 low-to-up
transitions.
2.
Breaking the PEM
note: this ‘phase’ is not the phase-offset between the PEM drive signal
and the actual retardance state of the PEMs. The PEMs are not driven
synchronously with the data acquisition, so we begin data acquisition at a
random point in the PEM’s drive signal. Ultimately, we want to construct
a cosine waveform, y(t) = cos ( wt + f) that is
Figure zz. Cartoon of idealized train of PEM square-waves in its drive signal, and the
‘reference waveform’ that is constructed to have the same period and phase as the
drive signal.
Drift of PEM period
Table zz tabulates the measured period (ensemble taken over ‘good’
periods) for a typical run day in 2012 for the 20 kHZ PEM. The standard
deviation for individual shots is about 0.5 because the period is just about
half-way between 49 and 50 indices (microseconds), so about half of the
periods have length 49, and half have length 50. The standard error is just
the standard deviation divided by the square-root of number of
measurements (=2.42e5).
It’s not clear to me whether the ‘std-err’ is the appropriate measure of the
uncertainty in period length for an individual shot, given the quantization
in the measurement.
The mean period, averaged over all of the shots, is 49.5250 +/- 0.0066
indices. But the more useful statistic is the shot-to-shot change in the
period length: note that there is not a simple random ‘scatter’ in period
length on successive shots, rather there is a rather slow, smooth drift in
period length, with successive shots changing by about 0.001 to 0.002.
Assuming that the shots are spaced 15 minutes apart and that the change
in period is 0.002, then we would expect the change during a 12-second
shot to be 0.002 x (12/60/15) = 2.7e-5.
Suppose we measured the period at the beginning of the shot and
constructed a ‘reference’ waveform for the entire shot. The question
arises, how much out of phase would the reference waveform be relative
to the actual drive signal for the PEMs?
N1 = 12 x 106 / 49.5
= 2.424242 e5
N2 = 12 x 106 / (49.5+ 2.7e-5) = 2.4242411 e5
N = N1 – N2 = 0.132 periods = 0.83 radians
This would be a very serious problem, because the cosine of this angle (=
0.67) is the factor by which the 40 kHz MSE signal would be artificially
multiplied, i.e. it would result in an underestimate of the 40 kHz
amplitude of 33% by the end of the shot.
For this reason, we compute the period length in chunks of time not more
than 200 ms. The error in period length (due to drift) is then reduced by a
factor of 0.2/12, or 4.5e-7. And the number of periods over which this
error in integrated is reduced by the same factor. So N for the 200ms
time intervals should be reduced by a factor of (0.2/12)2, to 3.7e-5
periods, or 2.3e-4 radians. The cosine of this angle is within 3 x 10-8 of
unity, so negligible error is presumably introduced by the drift of the PEM
period.
We might want to consider taking longer time intervals. For example, if
we were to take a 1-second time interval, DN would be 0.83/122 = 5.73e-3
radians, which would correspond to an error in the inferred 40 kHZ signal
of 1.7e-5.
Figure zz. Mean period for the 20-kHz PEM on shots 1-25 from September 12, 2012, from
ensemble of ‘good’ periods. The standard deviation is about 0.5 because the period is just about
half-way between 49 and 50 indices (microseconds), so about half of the periods have length 49,
and have have length 50. The standard error is just the standard deviation divided by the
square-root of number of measurements (=2.42e5).
Figure zz. Period for 22 kHz PEM for shots 1-25 on September 12, 2012.
History
We processed ~25 shots per day for selected run days and calibration
scans starting in 2008 and extending through the December 2012
calibration and heating scans. The tables below show statistics for the
mean period (averaged over the shot ensemble for the run day or
calibration scan), the standard deviation in the mean period, and the
number of ‘good’ and ‘bad’ periods. For this exercise, the threshold for a
‘good’ period is one for which the period length is within 1.5 units of the
mean period M1 (note that M1 is computed over the total ensemble of all
periods). A ‘bad’ period is one for which the period length is more than
1.5 units away from the mean period. We also record the number of
periods for which the period length is between 1 and 2 units removed
from the average, 2-3, 3-4, 5-10, and more than 10.
The reported ‘mean’ period is the mean value of the period length, taken
over the ensemble of ‘good’ periods. Similarly, the standard deviation is
taken only over the ensemble of ‘good’ periods.
What we should have done: Compute the ‘good’ periods as described
above, and compute the mean period M2. Then, re-compute the
difference between each period in the array of ~250,000 periods and M2
to obtain an array of differences, and use this difference-array to
compute whether a data point is good or bad. I don’t think it will make
much difference to identifying which points are good or bad – both
because the fraction of bad points is low, and because there tends to be a
‘long’ period for every ‘short’ period, so the net effect on the mean period
is reduced.
20 kHz PEM: (2008 thru end of 2012 run campaign):