Jitter suppression for resonant galvo based high-throughput laser scanning systems

: Laser scanning has been widely used in material processing and optical imaging. Among the established scanners, resonant galvo scanners oﬀer high scanning throughput and 100% duty cycle and have been employed in various laser scanning microscopes. However, the common applications of resonant galvo often suﬀer from position jitters which could introduce substantial measurement artifacts. In this work, we systematically quantify the impact of position sensor, data acquisition system and air turbulence and provide a simple solution to achieve jitter free high-throughput measurement.


Introduction
Laser scanning technology holds great importance in material processing [1][2][3] and optical imaging [4][5][6][7][8][9][10][11][12]. Many high-performance biomedical imaging techniques rely on laser scanning, which include confocal microscopy [5], optical coherence tomography [6,13] and multiphoton microscopy [4,7,8,[14][15][16]. For high-throughput recording, resonant galvo scanner is particularly important for its speed, robustness, compactness and 100% duty cycle [3,7,8,17]. The data throughput of a scanner is determined by its aperture, angular range, frequency and wavelength [5]. For a 5 mm aperture, 26 optical degrees, 8 kHz scanner (e.g. CRS 8 kHz Cambridge Technology), the average scan speed for a 920 nm laser is 39 M mode/sec (i.e. diffraction limited spots per sec) and the peak speed of the sinusoidal scan is 62 M mode/sec. To properly sample the data, we need a peak sampling rate of 124 M points/sec, which exceeds the throughput of most commercially available scanners. However, whether such a scanning speed can indeed produce meaningful information depends on the repeatability or predictability of the scanning pattern. In practice, it is often found that there is substantial scanning jitter, which leads to random image distortion. As a result, for high-quality and high position accuracy measurement, one has to greatly reduce the scanning range (e.g. oversampling with 4x or even 8x zoom). Therefore, the random jitter causes a dilemma. We need to either sacrifice image quality to gain throughput and field-of-view (FOV) or vice versa. As high-throughput high-quality measurement holds great importance to many applications [1,2,[4][5][6]17], we need to understand the sources of the image jitter and provide a robust and simple solution to enable jitter-free high-throughput measurement.
The position jitter may result from several factors, the accuracy of the galvo's internal position sensor, the temporal accuracy of the data acquisition system, air turbulence and the environmental noise. First, resonant scanners are typically driven by an internal phase locked loop which requires a positon feedback [3,11]. This internal position feedback also provides a trigger signal for synchronizing the application system's data acquisition to the resonant scanning [18]. If the position sensor is not sufficiently accurate, the recorded data will contain position jitter. Second, the data acquisition system also has finite timing resolution, which affects both the trigger detection and the data sampling. In the aforementioned resonant galvo throughput, the peak sampling requirement reaches 124 M points/sec. If the trigger pulse edge detection can only reach this 124 MHz sampling rate, the trigger signals arriving between two consecutive sampling points will be treated as the latter point, which will introduce the uncertainty (jitter) of up to one pixel in time. From the early discussion, we only have two points to support a diffraction limited spot (optical mode), and thus the one pixel jitter is actually quite significant. Another factor to consider is that the data acquisition system has its sampling clock whose tick may not coincide with the arrival of the trigger. This will also introduce one pixel level image jitter. Third, air turbulence may also affect the mechanical motion of the galvo. The edge of the 5 mm 8 kHz galvo travels at an average velocity of ∼9 meter/sec, close to the speed of 100-metre dash. Fluid dynamics is known to produce chaotic response [19]. It is unclear whether such a travel speed is sufficient to perturb the scanning at the single optical mode level magnitude. Fourth, the general laboratory environment could contain acoustic noise, which may be coupled to the galvo resonator and introduce jitter.
In this work, we systematically investigated these factors and quantified their contribution to the image jitter. Finally, we present a simple solution to achieve high-throughput jitter-free imaging.

Methods
We utilized a 5 mm 8 kHz resonant galvo scanner (CRS 8 kHz Cambridge Technology) in this study for its high scanning throughput and broad adoption in laser scanning microscope systems [17]. The imaging laser source wavelength was 920 nm. To quantify the scanning jitter, we positioned a 10 µm slit (S10RD, Thorlabs) on the focal plane of the scan lens ( Fig. 1(a)). Behind the slit, there was a photodiode detector with 14 ns rise time (DET36A, Thorlabs). To provide an external optical position feedback, we used a low-cost 785 nm laser diode (L785P090, Thorlabs) coupled to a single mode fiber to serve as the reference laser source and again employed a slit and a photodiode for position detection. To isolate the external acoustic noise and control the air pressure around the galvo, we fabricated a sturdy aluminum enclosure with two optical windows (25 mm 84465 and 50 mm 84469, Edmund Optics). There was an air vent on the enclosure, connected to a vacuum source ( Fig. 1(b)) for air pressure control. For jitter quantification measurement, we used the resonant galvo to perform repeated line scan of the slit and recorded the photodiode signal. For data recording, we used the widely used laser scanning microscope software ScanImage [17,18] to control a FPGA based high speed (120 M sample/sec) 4-channel digitizer system (NI 5734, PXIe-1071, PXIe-7961 and PXIe-6341). The resonant galvo scan range was set to the maximum value of 26 optical degrees to mimic the situation of high-throughput recording. The recorded images were analyzed by a MATLAB program to extract the jitter information. For jitter analysis, we used the center of mass to represent the slit center on each line. The averaged center position was used as the ground truth. The deviation from this value was considered image jitter.

Results
First, we quantified the image jitter for using the internal TTL trigger signal. The time lapse line scanning showed substantial jitter (Fig. 2(a)). To test whether this was due to the internal trigger accuracy, we switched to the reference laser based external optical trigger. During a single oscillation cycle, the laser beam scanned across the reference slit twice. To provide just one trigger signal per oscillation cycle for the ScanImage software, we utilized the internal TTL signal to trigger a square wave which turned on the reference laser during only half of the oscillation cycle. Using this optical trigger, the image jitter was significantly reduced (Fig. 2(b)). However, there appeared a quasiperiodic jitter noise. One hypothesis we had was that the data acquisition system always had a finite sampling rate. If the trigger arrived between two adjacent sampling points, it would be treated as arriving on the latter time point. Therefore, the trigger would contain a time uncertainty of up to one time step. Moreover, the analog sampling would always run on a certain sample clock. So even with a perfect trigger sampling, the actual data still need to be recorded according to the sample clock, which would again introduce image jitter of up to one time step. To test this hypothesis and more importantly provide a robust solution to get rid of this sampling jitter, we split the reference photodiode's signal, one to the delay generator for producing the optical trigger and the other to the second analog channel of the microscope (Fig. 1(a)). We also revised the reference laser control signal so that its output was higher during half of the resonant cycle and lower during the other half. We set the delay generator trigger threshold to be slightly above the lower signal. In this way, we still had a single optical trigger for Scanimage and two analog pulses for the second analog channel during each resonant cycle. With the simultaneous sampling capability of the digitizer, both channels (one from the actual image detector and one from the reference photodiode) contained similar digitization errors. Therefore, we could detect the jitter from channel 2 and use this info to undo the jitter of channel 1 which was the actual image channel. With this simple method, the jitter was indeed greatly reduced to much less than one pixel (Fig. 2(c)). This also proved that the quasiperiodic jitter was indeed a result of sampling. As long as the analog data recording satisfies the Nyquist limit, we can always computationally shift the image and remove the jitter, for which we utilized linear interpolation to achieve accurate sub-pixel shift.
To explore if we can further reduce the jitter to the ultimate limit of zero, we went on to test the effect of shielding external acoustic noise and reducing air pressure. Using a two-piece CNC machined thick aluminum enclosure (one base, one cover), we shielded the galvo. The two high-flatness glass windows ( Fig. 1(b)) allowed optical access. Through the air vent on the enclosure, we connected a vacuum meter and a vacuum source. Experimentally, we found that reducing the air pressure down to 0.3 atmospheric pressure made negligible difference to the jitter (Fig. 2(d)).
Together these measurements suggested that 1) the internal TTL galvo trigger contained substantial jitter; 2) the external optical trigger was reliable; 3) the sampling jitter could reach one pixel and it could be digitally corrected by using the jitter information from the directly sampled analog trigger signal and 4) reducing the air pressure (less air turbulence and lower acoustic noise) could not further reduce the jitter. Overall, to suppress the image jitter, all we need is the external optical trigger and the sampling jitter correction. A key question is whether the sampling jitter is highly correlated across the entire FOV. If so, we just need to measure the optical trigger at one position within the FOV and utilize their spatial correlation to provide full FOV image jitter correction.
To investigate the sampling jitter correlation across the entire FOV (4096 pixels), we used a precision function generator (AFG3252, TEK) to output periodic waveforms at 8 kHz to mimic the galvo scanning, which was connected to the analog input channel of the microscope. Within each period, the waveforms contained a few pulses to mimic imaging an array of slits across the FOV. From the recorded images (Fig. 3), we extracted the sampling jitter across the FOV and quantified their correlation. As expected, the sampling jitter was indeed highly correlated (in phase and with fixed ratio). The amount of jitter is the greatest in the middle of the FOV where the sinusoidal scanning is the fastest and most susceptible to sampling jitter. Based on this correlation, we would only need to measure the trigger signal in the center of the FOV to provide digital correction for the entire image. For fast and computation efficient FOV position dependent correction, we divided the raw line scan data into 64 segments and for each segment we applied different amount of shift based on the correlation curve (Fig. 3(c)). The measurement suggested that the combination of optical trigger and sampling jitter correction allowed us to suppress the jitter down to ∼2% of a pixel (Fig. 3(d)), sufficiently good for most applications. To validate this method, we performed 2D laser scanning transmission microscopy using the same 8 kHz galvo at full scan range. The numerical aperture of the objective lens was 0.6 and the laser wavelength was 920 nm. We imaged the element 5 and 6 in group 7 of the USAF target (Fig. 4) and the width of the thinnest line was 2.19 µm. Similar to the slit measurement, we observed the lowest image jitter when using the external optical trigger combined with the digital sampling correction.

Discussion
The dual channel recording could effectively suppress the sampling jitter. One drawback of such an approach was that we had extra data (second channel) recorded while only the information (a few pixels) near the center of the FOV was utilized. A simple solution to reduce the data stored is to have a program to immediately process the second channel and only store the amount of shift (one number) per line. An even better solution is to have the sampling jitter correction built within the FPGA based microscope software. For example, we could use an analog channel to sample the optical trigger and determine the sampling jitter and perform segmented shift for the imaging channel so that the output images are jitter-free.

Conclusion
Overall, we systematically investigated the contribution of galvo internal position sensor feedback, sampling error, air turbulence and environmental acoustic noise to image jitter. Our experimental data suggest that the internal sensor feedback contained significant timing noise and the data acquisition system could also introduce sampling jitter. A robust solution is to utilize an external optical trigger combined with digital sampling jitter correction. With this simple approach, we can effectively suppress the jitter to ∼2% of one pixel, sufficient for most applications. As resonant galvo based scanners are widely employed for high-throughput laser scanning imaging systems, this study and the validated solution hold great significance to achieving high-quality and high-throughput jitter-free measurement.