Smart Control for Resonant Galvo Scanners

High time-resolution confocal microscopy requires fast scanning devices

August 01, 2014

High time-resolution confocal microscopy (HTRCLSM) requires fast scanning devices. Whereas non-resonant galvo scanners allow full position control, but only at slow speed, resonant scanners allow ~25,000 lines per second, but offer much less positioning freedom. To still allow zoom and pan functions, several approaches have been tried, with varying success. The Leica confocal microscopes of the TCS series use a very smart solution [1] that enables stepless zooming with short switching times.

Fig.: © MNStudio – Fotolia.com

"Biology is a natural science concerned with the study of life and living organisms" is the introductory sentence of the Wikipedia entry for Biology [2]. Whereas microscopy in the old days was mainly concerned with dead objects (although formerly alive), the ultimate objective of biological microscopy is to visualize living objects. Although small biological samples often look inactive, the microscopic view unveils vibrant activities. Bacteria have fast-moving flagella, cells and tissues show very fast changes in metabolites, vesicles are transported at remarkable speed and electrical signals are broadcast by millisecond-range action potentials. To follow these activities, high frame rates are required. An early approach in confocal microscopy was the introduction of parallelized techniques, e.g. spinning disc systems, but they lack the true confocal sectioning performance. Single spot scanners offer the best optical sectioning performance, but are often considered slow. Employing resonant galvo-scanners, modern technology  can reach frame rates in the range of 500 per second. This article shows how the limits of these devices have been overcome.

Galvo Scanners – painting with laser light

In order to scan a light spot over a two-dimensional area, the angle of the light beam has to be changed. This task is easily solved by inserting mirrors into the beam path which deflect the beam. In order to scan, the mirrors have to be rotatable. The gold standard for rotating mirrors is to employ what is called a "galvo scanner". These devices have been used extensively in laser projectors for laser shows and film projection.

The term "galvanometer" originates from electrical metrology. To measure the current, a coil is inserted into a magnetic field. A needle is mounted on the rotation axis of the coil. As soon as a current is flowing through the coil, the Lorentz force causes a deflection of the needle. The higher the current, the wider the deflection against a reset force. The deflection can be calibrated for measuring current.

On the other hand: if the current is known, one can create a desired deflection. For light pointing applications (scanners), the needle is exchanged by a mirror. When a beam of light hits the mirror, the angle of reflection changes by two times the rotation angle.

For precise positioning, the rotation angle is decoded by a position sensor, mounted on the other side of the rotating rod. A feedback system controls the driving current to ensure that the deflection is always exactly at the desired angle. This allows control of scanning speed and static positioning in all points of the available xy plane. These scanners are called "closed loop" due to the closed feedback system. In imaging applications, an important pattern is the sawtooth scan. Line scanning at a desired speed is performed by moving the spot in one direction ("x") linearly in time at the required speed. Then, to repeat the scan, the mirror is moved back at maximum speed to the starting angle. This pattern is possible for slow line frequency as an alternative to sinusoidal scan.  A two-dimensional scan – the standard application – is generated by introducing a second scanner perpendicularly into the beam path. This second ("y") scanner generates the increment in the second axis. Obviously, the speed (under standard conditions) of the y scanner is much slower as compared to the x scanner and therefore has far fewer restrictions.

At ca. 500 Hz line frequency and full frames of 512 × 512 pixels, the frame rate reaches about one per second. With fixed samples, this is sufficient temporal resolution and gives great signal-to-noise ratio. On the other hand, when imaging fast moving objects, frame rates above 100 per second  (preferably about 500 per second) are desired. If these images are to have 10 lines per frame ("strip scanning"), a scanner is needed that can generate 5,000 lines per second.

Although scanners and scan mirrors are made of light-weight material and are as small as possible, they are mechanical devices that exert significant inertia. Therefore, at higher speeds they can only perform sinusoidal scans. At the extreme, scanners have been developed which scan only in sinusoidal mode and only at their resonance frequency. Like a swing, these devices can only change their amplitude (by feeding more energy) and their phase, the position of the period in relation to external standards. Currently, resonant galvo scanners with 12,000 Hertz frequency are available. When recording data during both forth and back train (bidirectional imaging), the line frequency for imaging can reach 24,000, corresponding to ~45 full frames per second, about the same frequency as most modern motion pictures are using. On the dark side, these resonant scanners have no control of position and scan frequency. Such scanners offer an electromagnetically tapped feedback, but this is too inaccurate to be of any use.

Galvo scanners, as used in Leica true confocal scanners (TCS), are derivatives of galvanometers, metrology devices that have been used to measure electrical parameters. Initially, these devices were equipped with rotating coils, with a pointer mounted on

Fig. 1: Originally, a galvanometer was designed for measuring electric current by means of a coil that can rotate in a magnetic field. Left: Upon a current flowing through the coil, the Lorentzian force tilts the coil and the needle that is fixed to the rotation axis. The tilting depends on the current I, which can be calibrated.
Right: A more precise version is equipped with a mirror mounted on the axis instead of the needle. Upon shining collimated light (best case: laser light) onto the mirror, the deflection can be monitored on a screen (flying spot method).
When a known current is applied, the deflection can be controlled. A programmed current train will cause a temporal movement pattern of the spot. This is the working principle of a galvo scanner.

The Field Number – a better choice than Zoom Factor

Microscopes have circular optics. If you look down the microscope, what you see is a circle. How much of your sample you can observe at a given magnification is specified by the field number FN (Sehfeldzahl, SFZ), which is the diameter of the image in mm at the field plane of the eyepiece (intermediate image plane). If using a 40x lens and an eyepiece with field number 25, then the actual area you can observe is a circle with a diameter of 625 µm. Of course, the lens has to be sufficiently corrected to handle such a large field if decent imaging is the target, and usually the field is confined for confocal scanning in order to ensure sufficient image quality. Scanning images are typically square, or rectangular. If scanning the full field that is specified (e.g. the above-mentioned SFZ 25), then the diagonal of the rectangle equals the field number, and a 40x lens would give 625 µm as diagonal. If scanning a square, the edges correspond to 442 µm × 442 µm.

Instead of scanning the full field, it is very simple to scan only a fraction of it just by reducing the amplitude (elongation) of the galvo scanners. If the scan amplitude is half, only half of the respective dimensions are recorded. The area of the square then corresponds to a quarter of the full field scan.

Still, the number of pixels is the same, and when displayed on a monitor, the size of the monitor does not change either, of course. In essence, the smaller scan has generated an additional magnification by a factor of two. This additional magnification is steplessly tunable and called "scan zoom". It is not obtained by optical elements, and should therefore not be mixed up with optical zoom arrangements. As it is not a variant in displaying the recorded pixel data, it should not be mixed up with display zoom options, either. In fact, the scan zoom is a mechanical zoom controlled by the mechanical performance of the scanning device (although this is driven electrically and controlled electronically and computerized).

As there is no limit to reducing the scan amplitude until it reaches zero, the scan zoom can deliver infinite magnification. Nevertheless: like with the eyepiece’s magnification in an ordinary microscope, there are rules that define when the scan zoom crosses the horizon of meaningful use. These rules depend on the resolution power and the magnification of the lens, and the number of pixels recorded per dimension. For imaging, a scan zoom above 20x is rarely required. Higher zoom factors are only used for laser manipulation, e.g. bleaching or photoactivation.

As different manufacturers use different field numbers, the absolute value of the scan zoom is not comparable. To additionally confuse the operators, some use even zoom factors smaller than one. A much more sensible value would be the actually used field number, just by calculating the diagonal of the scanned area and multiplying this by the magnification of the objective lens. With such an indicator, it is even possible to compare the performance at dissimilar optical magnifications (different objective lenses).

When not scanning the full (optical) field, one has the freedom to select which part of the field is scanned. This function is called "panning" and requires the programming of a scan offset, i.e. the scanner does not operate symmetrically. This is only available for closed-loop scanners. Resonant scanners need different solutions for panning.

The Leica TCS SP8 and TCS SP8 STED 3X use amplitude control for zooming and scan offset for panning. Zoom controls the scanned field size and should be indicated as the change in field number FN.

Fig. 2: Top: The optical field of view is fully used by a square scan that touches the limit of the intermediate image field. The size corresponds to the diagonal of the square (identical with the diameter of the circular field (dotted circle) which is usually indicated as the field number FN. Typically, the largest scanned area is somewhat below the optical field number, therefore we will call it FN0 to compare it with zoomed scans.
Middle: If the scan amplitude is reduced, e.g. by a factor of 3 in both dimensions, then the used field is also 1/3 of the original field diameter. The optical resolution remains unaltered, the scan resolution is increased, as is the effective magnification. This operation resembles a 3x zoom with respect to the original field (1x zoom). For appropriate comparison, this should be displayed in terms of FN, here FN = FN0/3.
Bottom: When the zoomed scan starts from the midpoint, the scanned area can be moved inside the optical field. This is referred to as the pan function (panning).

How to correct the false moves

As mentioned earlier, the rate-limiting element when scanning is the x galvo. If there was no idle time required for retracing, and the scanner could operate at a perfect sawtooth, then the time per pixel would be 1/f*x , with f being the scan frequency and x the number of pixels. For real scanners, this is not entirely reached, as the retracting time is finite, and the "ends" of the mechanical elongation are cut off as they show non-linearities. At higher speeds, programmable scanners are operated in sinusoidal mode, which is also possible for the slow speeds, of course. Resonant scanners can only scan sinusoidally.

If scanning a sine, then the spatial-temporal relation is no longer linear. As image distortions are not acceptable, the intensities have to be recorded equidistantly in x and y, corresponding to inequidistant recording in time. Therefore, the start time of data records (pixels) in a line is denser in the middle of the line where the scanner moves faster, and farther apart at the ends of the line, as the scan speed is zero at the end and starts moving in the opposite direction. A not entirely appropriate, but possible solution to that problem would be to use only the very middle of the sine, which is approximately linear. But then one would lose 90 % of the available scan time (while the laser is on all the time) and would need to scan at even wider amplitudes, which in turn would slow down the galvo scanner. Consequently, one uses a larger fraction, e.g. 80 % of one train (which gives a temporal cycle of 60 % when operating in bi-directional mode) and applies a non-linear pixel clock. This nonlinear pixel clock is easily obtained with closed-loop scanners, as they offer to use the position decoding for external use. A second effect of nonlinear pixel times is the fact that the recording time per pixel is also position-dependent. If one employs a standard charge amplifier for intensity-current conversion, the pixels would be brighter at the edges. In addition, the noise is less at the edges as compared to the center of the scan. For normal imaging, this is not an issue. Noise-dependent methods, such as raster image correlation, will suffer from such records, as the noise is high in short pixels and lower in long pixels. Here, one has to ensure constant integration times throughout the scanned area (which is at maximum the length of the shortest pixel in the center). High frequency sampling and intrapixel accumulation [3] as introduced in confocal microscopy with the Leica TCS SP5 allows control of the integration time per pixel independently of position and speed.

Fig. 3: Left: when scanning sinusoidal and recording data with an uniform pixel clock dt, the signal would be drawn from non-equidistant points in the sample, and hence the image would be distorted. At the center, the image would be expanded due to the faster pace of the scanner (distance per time: dsC). At the edges, the image would be squeezed due to the slow speed of the scanner (distance per time: dsE).
Right: In order to acquire data at spatially equidistant points ds, the pixel clock has to be programmed for longer times at the edges (dtE) and shorter times in the center (dtC).

A pedestrian solution: use Ronchi grating and chop optically

A resonant scanner is not programmable for speed and scan offset and lacks a precise position read-out. To still employ resonant scanners with benefit, these shortcomings need to be compensated for. A first workable solution using optical rulers as a sample clock was described in 1995 by R. Tsien in Pawley’s confocal Handbook [4]. This approach utilized a second, low-power red laser  directed to the rear (also reflective) side of the scan mirror as a position probe. The reflected probe light passes a grating that consists of transparent and non-transparent stripes (Ronchi grating), very much like a picket fence. The probe light scans over the grating and the light is detected by a photodiode afterwards. As the picket fence is equidistant and the scanner movement sinusoidal, the modulated probe light exerts a bright-dark pattern with sinusoidal pulse lengths. The flanks of these patterns can be used as a pixel clock, which is then sinusoidal in time, but equidistant in scanned field space.

Although this concept solves the problem of nonlinear pixel clocks, it has its limitations. The maximum number of pixels is ruled by the number of grid elements in the grating. The number of pixels may only be switched in whole number fractions of the number of slats in the fence.

The available zoom factors depend on the availability of appropriate gratings: higher zoom factors require shorter (and denser) gratings for equal pixel numbers. Consequently, there is no way of continuous zooming and when switching the zoom, one has to change the grating in the probe beam path. Therefore, a set of gratings must be available in a grating repository – usually a rotatable disc.

Panning is not available with such mechanical reference measurements.

Optomechanical pixel clock generation for resonant scanners using a Ronchi grating

Fig. 4: Left: Schematic drawing of a resonant scanning confocal with optomechanical pixel clock decoding. For imaging, the laser is directed through a splitting mirror onto the scan mirror and excites the fluorochromes in the sample (blue trace). The emitted light (green trace) is descanned by the scan mirror, reflected by the splitting mirror and converted into an electrical signal by the detector. An auxiliary laser is directed to the rear side (also reflecting) of the scan mirror (red trace). It passes a pixel grating which causes a binary signal Ip from the detection photodiode.
Right: Extraction of a set of pixel clocks by tracing a probe beam (reflected at the back side of the scan mirror, x’) over a grid consisting of a fixed number of opaque and transparent equidistant stripes. The sensor will produce an intensity signal Ip which is then converted into pixel trigger pulses tpix.

A smart solution: use lock-in and extract the entire movement

How can we design a control for resonant scanners that allows both continuous zooming and selection of any number of pixels up to the maximum? And unidirectional or bidirectional scan at the user’s request? A stable and precise solution was introduced by Leica with the TCS SP2 in 2000. This concept has since been applied in systems with resonant scanners from Leica.

Resonant galvo scanners are torsional harmonic oscillators. They oscillate rotationally in harmonic motion. Consequently, their pattern of motion is a strict sine function.  All we need to do is to measure the actual phase and amplitude of the scanner in motion and compare it to the excitation signal. The measurement is done by an infrared diode that shines onto the rear face of the scan mirror. To detect the signal, a position-sensitive device (PSD) is employed. This is an amorphous and hence continuous measuring device, unlike a grating, which has a predefined number of elements (restricting the resolution of the measurement). From that, we can extract the exact amplitude and phase by a lock-in method, which allows us to create a synthetic sine function resembling the true movement of the mirror. This is possible, as the q-factor of a resonant galvo is in the range of 1,000. That means, the system invariably oscillates sinusoidally at the resonance frequency - the deviations are less than 0.1 %, even if excited by a square wave. The resonance frequency depends on temperature and other environmental parameters, but as we measure the frequency, we can be sure of operating the scanner at the optimal frequency. This method does not rely on accuracy of gratings, nor on adjustment and replacement of such gratings or other mechanical or optical aids. By high-quality measuring amplitude and phase of the oscillator, we have very exact knowledge of the position of the mirror at all times.

Now knowing the position of the spot in the sample at any moment, we can assign the detected signal to the spatial coordinates in x and y (and z). And we are free to break down the train of detected intensity (which we measure continuously with a high-frequency sampler), in any number of pixels. That is: if the maximum number of pixels is e.g. 1,000 per line, we can theoretically request any scan format between 1 and 1,000.

Furthermore, we can decide to use all the measured signal, which corresponds to longer pixel times at the edges of the x scan. Or, to ensure equal properties to measure higher moments like the variance of the intensity for correlation studies, we can restrict the pixel length to a constant all along the x scan.

As we measure and control the amplitude, we can continuously alter the field size. That is: continuous zooming, which is impossible with mechanical grid references.

If we want to move the zoomed area in the microscope’s field of view, we can mount the resonant scanner on a rotatable device, which allows the addition of a mechanical offset (here: in x direction). The position sensitive device and the extraction of the oscillation properties with the lock-in system still work under these conditions, which allow us to use the pan function with resonant scanning, too.

Position-sensitive diode-based nonlinear pixel clock generator for tunable zoom and free adjustable formats. Realized in Leica TCS SP5 and Leica TCS SP8 confocal and multiphoton scanning microscopes. Also available for TCS SP8 STED and STED 3X instruments

Fig 5: Left: Schematic drawing of a resonant scanning confocal with lock-in pixel clock decoding. For imaging, the laser is directed through a programmable opto-acoustic splitter onto the scan mirror and excites the fluorochromes in the sample (blue trace). The emitted light (green trace) is descanned by the scan mirror, transmitted by the AOBS and converted into an electrical signal by the detector. An auxiliary IR diode is directed to the rear side (also reflecting) of the scan mirror (red trace). It reaches a position-sensitive device (PSD), which delivers a signal that can reproduce the full movement of the scan mirror.
Right: Block diagram of position-controlled tunable pixel clocking with resonant scanners. The movement of the mirror is monitored by a position-sensitive device (PSD) which feeds into a lock-in amplifier. Here, the actual movement (act) in terms of amplitude and phase are compared with the excitation signal (nom). A DSP-based controller adjusts any deviations from the optimal operation and provides the correct parameters to a pixel clock module. Here, the emission signal from the microscope is split into spatially equidistant segments (pixel clock). The actual integration time per pixel is also controllable and may cover the full pixel time (not equally long at the edges versus center), or trim the pixel integration time to temporally equidistant measurements.

Comments

Help us to improve the Leica Science Lab and participate in our survey! Start Survey

Arrow Down

Arrow Up