.. _Scan_Pattern: ============ Scan pattern ============ Blickfeld’s devices are scanning LiDARs. Scanning LiDARs usually conduct subsequent measurements, each comprising only single or a couple of points in space in the same direction. Thus, the whole field of view is not covered at once but rather within a certain time frame. Blickfeld’s MEMS sensor deflects the collimated laser beam with the help of two MEMS mirrors in each desired direction and uses ‘time of flight’ measurement to determine the distance to the reflecting object to the LiDAR. Both mirrors perform oscillating movements. Because of this particular movement and the relative orientation of the two mirrors towards each other, the resulting laser beam trajectory that is generated when both mirrors oscillate with maximum amplitude circumscribes the field of view. Description of the technical scanning process ============================================= The Blickfeld scanner consists of two mirrors that oscillate with the same frequency. The two mirrors are identical and differ only in their orientation (one horizontal, one vertical) and in their relative phase and amplitude. Together, they create a Lissajous curve with a frequency ratio of :math:`1:1` , a phase difference of :math:`\Delta \phi = 1/4 \pi`, and a variable amplitude ratio. The following section provides a brief analytical description of the creation of the scan pattern. Horizontal mirror ----------------- The two mirrors, both with the natural frequency :math:`f`, create a scan pattern with the frame duration :math:`T`. Hereby, :math:`T` is always an integer multiple of :math:`1/f`. The horizontal mirror oscillates in a continuous sine wave during a single frame. The resulting horizontal angle :math:`\theta_H` can be described as follows: :math:`\theta_H(t) = \theta_{H,max} / 2 \cdot \cos(2\pi f t)` With the horizontal field of view :math:`\theta_{H,max}` (which can be chosen freely within the physical limitations of the horizontal mirror). The blue line in Figure 1 below shows a plot of the horizontal angle :math:`\theta_H` for an exemplary frame with an eigenfrequency of :math:`f=150 Hz`, a horizontal Field of View :math:`\theta_{H,max}=80\deg`, 40 scanlines (20 periods) and a duration of :math:`T=20 \cdot 1/f`. Vertical mirror --------------- The vertical mirror has a phase offset of :math:`\Delta \phi = \pi / 4` with respect to the horizontal mirror and a variable amplitude that is described by the ramp function :math:`r(t)`. The vertical angle can therefore be written as: :math:`\theta_V(t) = r(t) \cdot \theta_{V,max} / 2 \cdot \sin(2 \pi f t)` The vertical field of view :math:`\theta_{V,max}` can also be chosen freely within the physical limitations of the vertical mirror. Ramp function ^^^^^^^^^^^^^ The ramp function consists of two segments. During the first half of the frame it is a strictly monotonically increasing function from 0 to 1, while during the second half, it is a strictly monotonically decreasing function from 1 to 0. An exemplary function consisting of two linear areas can be described as: :math:`r(t) = 4/3 t / T` for :math:`t \in [ 0; 3/4 T ]` :math:`r(t) = 4 - 4t / T` for :math:`t \in ] 3/4 T; T ]` Note that these linear functions are only exemplary. To create different densities of scan lines, throughout the scan pattern, ramp functions with varying slopes, or nonlinear ramp functions can be chosen (the maximum slope of these functions is limited by the characteristics of the mirror). The spacing of the scan lines can therefore be controlled by adjusting the ramp function :math:`r(t)`. The ramping phases are known as the up-ramping phase and the down-ramping phase. The orange line in the following figure 1 shows a plot of the vertical angle :math:`\theta_V` for an exemplary frame with a natural frequency :math:`f=150 Hz`, a vertical field of view :math:`\theta_{V,max}=30\deg`, and the ramp function :math:`r(t)` defined in the previous example. .. image:: images/mirror-movement.png :width: 800 Figure 1: Movement of the horizontal mirror (blue) and the vertical mirror (orange). Scan lines ---------- One scan line is defined as half of the period of the horizontal mirror’s oscillation, i.e., a movement of the laser beam from right to left or from left to right. The number of scanlines per frame :math:`N` results from the following equation: :math:`N = 2 T f` By altering the number of scan lines per frame, you can directly decrease or increase the frame duration :math:`T`. As the frame rate of the system is equal to :math:`1/T`, the frame rate is inversely proportional to the number of scan lines per frame. The horizontal mirror starts on the left and moves to the right. The vertical mirror starts at zero and moves to the bottom. As depicted in figure 2, the first scan line is nearly a straight line in the middle from left to right. The second scan line is above the first scan line and moves from right to left. The third scan line is below the first scan line and moves from left to right. The fourth scan line is above the second scan line and moves from right to left, and so on. .. image:: images/scanpattern.png :width: 800 Figure 2: Movement of the laser beam, if the laser diode were continuously emitting. Configuring the scan pattern ============================ The WebGUI can be used to configure the scan pattern manually. If you want to change it in a script, use the BSL API. The following parameters can be defined (see protobuf definition: `Scan Pattern `__) * The number of scan lines for the up-ramping phase and the down-ramping phase * Optical vertical and horizontal FoV * Laser pulsing in the up-ramping phase, the down-ramping phase, or both