EXPERIMENTATION OF CENTROID STABILITY AND SIMULATED
NOISE, STATICS AND DYNAMICSKevin Kelly
Mentor: Peter Revesz
Brief Introduction Importance of Project: Beam stability is crucial in CHESS,
down to micron-level precision The beam position is measured using a video imaging
system by determining the intensity centroid. We measured how parameters like the image frame
averaging number and other acquisition settings affect the stability of the measured centroid, modeling the X-ray luminescence with an LED light source on an optical bench.
We analyzed data measured with USBChameleon to calculate the sigma of the centroid position, lower sigma relating to higher precision.
Noticed a trend – the greater the frame average, the lower the sigma.
0 5 10 15 20 25 30 350.0
0.1
0.2
0.3
0.4
0.5
0.6
Sig
ma-
Y N
orm
al (u
m)
Frame Average
Frame Averaging v. Sigma-Y: Normal Centroid at .183m
Chameleon GUIROI
Centroid Position Trace
Inputs
Outputs
Profile of Image
Experimental Setup We have carried out our experiments using
the model light source (LED) mounted on a linear precision slide on an optical bench for maximum mechanical stability
To reduce any potential outside effects on the experiment (airflow, external light, etc.), we added a special shielding cover.
Using the USBChameleon program we obtained statistical data about pixel intensities and centroid position under various experimental conditions.
CCD Camera, Mounted to the Optics Bench
Chameleon by Point Grey Research, pixel size ~3.5 mmResolution: 640x480 (low), or, 1280x960 (high)
Experimental setup, covered in metal shield to reduce any airflow from affecting the light
source
The LED Light source, mounted and stabilized
Parameters to TestOur next parameter to test was Shutter Time, or the length of
exposure for each image. Because longer exposure time means more light incident on the CCD, the higher shutter time, the brighter the image.
• Tested 60 combinations of Frame Average and Shutter Time:• Frame Average: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10• Shutter Time: 25ms, 40ms, 55ms, 70ms, 85ms, 100ms
We repeated this for Low Camera Resolution and High Camera Resolution to have data for both settings as well.
Other parameters not adjusted include:• Gain• Camera Lens• Light source symmetry• Aperture
0 20 40 60 80 100 120
0
2X
-Pos
ition
of C
entro
id (m
icro
ns)
Time (s)
A typical plot of the centroid position over time, static LED position. After fitting a trend, we
analyze the residual and calculate a standard deviation from that (s).
2s
Instead of trying to separate and individually analyze the sources of noise in experiments, we opted to just measure the standard deviation experimentally and attempt to look at the noise sources through different means.
The instability of the centroid comes from a variety of sources:• Experimental Conditions:
Mechanical instability of the light source, vibrations, airflow in experimental tunnel.
• Errors in CCD: Read Noise, Photon Noise, Dark Noise
• Experimental Paramters: Adjusting Frame Average, Shutter, Type of centroid calculation, etc.
Results• Observed the same trend
for Shutter Time as for Frame Average – inverse relationship.After analyzing, the trend was
noticed to be an inverse-square-root. The equation is this:
𝜎=6.897
√𝐹∗𝑆Where F is the Frame Average Value and S is the Shutter Time, in milliseconds.
Some key measurements we needed to keep track of: Shutter Time, Frame Average, Sigma (obviously), but also the ROI Size and the average FWHM of the profile throughout each trial. These will be important later.
For static LED the best precision we measured ~0.07 mm !
Analysis of Pixel NoiseStatic Image
Added a new functionality to USBChameleon, PixelSave.
Used this on a slice of the image for all the combinations of frame average and shutter time mentioned above.
The results were then analyzed to see a trend between a given pixel’s average intensity and intensity distribution.
We repeated this measurement a number of times (typically 200) to obtain statistics
ROI of Pixel Intensities being saved
Pixel Intensities across ROI
0 20 40 60 80 100 120
0
10000
20000
30000
40000
50000
60000
Pix
el In
tens
ity
Pixel
Typical plot of Standard Deviation of Pixel Intensity v. Average Pixel Intensity with
trendline.
Histograms of single-pixel statistics, one at low intensity, one at
high.
• Two important things to note:• Each pixel’s histogram resembled a
Gaussian distribution.• Increasing Average Intensity leads
to increasing Standard Deviation. – close to a square root dependence.
We used the measured spix-int vs. intensity values in the Monte Carlo Simulations
Moving from Static to Dynamic Aliasing effect 1: The pixel intensity digitalization,
because it is to 12-bit accuracy, introduces “rounding.”
Aliasing effect 2: Averaging the pixel intensity over a finite pixel size results in a “jagged” image profile
As a result, the image is slightly distorted, and the distortion changes as the image moves.
The overall result of this is a (periodic) artifact in the centroid position during image motion.
To verify this, we used the motor-controlled slide that the LED is mounted on to perform our experiments, taking steps of 5, 10, and 15 microns, as well as a steady state to compare.
Aliasing Pictures
Beginning
Halfway
End
• Just looking at the trace of the measured centroid, the position seems perfect! But when we take a closer look at the residual, we observe that there are two frequencies of oscillation.
0 2000 4000 6000 8000
-6000
-4000
-2000
0
Cen
troid
Pos
ition
(mic
rons
)
Distance moved by Slide (Microns)
0 2000 4000 6000 8000
-4
-2
0
2
4
Res
idua
l of X
-Pos
ition
of C
entro
id (m
icro
ns)
Distance Moved by Slide (microns)
The easiest way to analyze this residual is an FFT, Fast Fourier Transform. The result of this is a plot of frequency v. magnitude. The magnitude is related to the amplitude of the oscillation at that given frequency.
Trace of Centroid, moving 10 micron steps
Residual of Above Graph
FFTs
LED moving by10 micron steps, Low-Res, Normal Centroid
LED moving by10 micron steps, Low-Res, Squared Centroid
LED moving by15 micron steps, High-Res, Normal Centroid
Control – Steady, unmoving, Normal Centroid
0.000 0.013 0.026 0.039 0.052
0.00
0.25
0.50
0.75
Spatial Frequency (1 / microns)
Am
plitu
de (m
icro
ns)
0.000 0.013 0.026 0.039 0.052
0.00
0.31
0.62
0.93
Spatial Frequency (1 / microns)
Am
plitu
de (m
icro
ns)
0.0000 0.0091 0.0182 0.0273 0.0364
0.00
0.27
0.54
0.81
Spatial Frequency (1 / microns)
Am
plitu
de (m
icro
ns)
0.00 0.11 0.22 0.33 0.44
-0.79
0.00
0.79
1.58
Spatial Frequency (1 / microns)
Am
plitu
de (m
icro
ns)
Methods to Reduce Aliasing
Enlarge
Average
“Jigsaw”
45-Degree Tilt
Simulation Developed a Monte Carlo
simulation program to create simulated 2D profiles with randomized “noise” based upon measured data and calculate the centroid, similar to what USBChameleon does.
For this I used the tables created from the single-pixel intensity statistic measurements.
1020
3040
50
0
10000
20000
30000
40000
50000
10
20
3040
50
Pix
el In
tens
ity
Y (P
ixel
s)
X (Pixels)
Ideal Gaussian
Noise added for Randomization
1020
3040
50
-400
-200
0
200
400
600
10
20
3040
50Add
ed N
oise
Y (P
ixel
s)
X (Pixels)
Simulation GUI After all of the code was written, I wrote a GUI for it for appearance’s
sake and ease of use. It has all of the inputs necessary and displays the simulated image over time, with the 12-bit greyscale converted to RGB (for visualization purposes).
The code also enables the user to move the Gaussian Profile with added noise as the centroids are calculated taking into account the discrete levels of the grayscale averaging over individual pixels.
Simulation ResultsStatic Image
304050
6070
8090100
0.0
0.1
0.2
0.3
0.4
24
68
10
Sig
ma
(mic
rons
)
Frame Average
Shutter (ms)
Simulating the low camera resolution experiment, the results had the same trend as the experimental values, just with a lower value, roughly a quarter of the measured sigma. The equation was this:
𝜎=1.917
√𝐹∗𝑆
Simulation ResultsDynamic Image
FFT of Ideally Simulated Centroid moving 10mm steps over 8mm, Low Resolution
FFT of Ideally Simulated Centroid moving 10mm steps over 8mm, High Resolution
0.000 0.013 0.026 0.039 0.052
0.0000
0.0055
0.0110
0.0165
Spatial Frequency (1 / microns)
Am
plitu
de (m
icro
ns)
0.000 0.013 0.026 0.039 0.052
0.0000
0.0077
0.0154
0.0231
Spatial Frequency (1 / microns)A
mpl
itude
(mic
rons
)
Conclusion Frame Average and Shutter both have a significant effect on the
stability of the centroid, at the tradeoff of measurement time. The noise of the pixel intensity closely follows a square root
dependence on the intensity, as expected. Analyzing the dynamic (moving) light source, we saw effects of
aliasing in the centroid position. We believe that this is a combined effect from finite pixel sizes and the digitalization of the pixel intensity.
To characterize the aliasing effect of the centroid position, we utilized FFT techniques. This FFT analysis revealed oscillations related to the pixel size and oscillation related to the imperfection of the lead screw of the motor-controlled slide.
Monte Carlo simulation of the 2-Dimensional image profile with added noise (using measured values) resulted in similar trends of centroid stability as the experimental data for both static and dynamic images.
Questions?