To improve the measurement accuracy of a lateral effect PSD system, in this part, different noises are identified, analyzed and eliminated by the signal averaging. In addition, effects of X–Y mismatch and rotations are corrected. Finally, a distortion rectifying algorithm effectively solving pincushion-type radial distortions is developed. Both simulation and experimental results verify the effectiveness of the developed accuracy improvement methods. Such a PSD system with high reliability and accuracy can be further used for a proposed scanning PSD microscopy. The microscopy is based on the vanishing effect and the multi-channel photocurrent feedback mechanism of the PSD. The vanishing effect is related to the four zero or low photocurrent outputs when the laser beam is blocked by meeting the object on the PSD surface. Several methods for detecting the exact positions where the blockings of the laser occur are proposed and implemented. Once the blocking positions of a scanning laser beam pattern are determined, the 2D of the micro-object on the PSD surface can be accurately measured. Preliminary results on accurately and rapidly measuring both opaque and transparent objects demonstrate the performance of the proposed microscopy system.
The lateral effect PSD
To implement our improvement methods, we have chosen a duo-lateral effect PSD (OSI Optoelectronics DL-4S) for building up the test bed and modeling. The lateral effect PSD is shown in Fig. 1 is a 2D sensor with 4 mm × 4 mm active area. In a lateral effect PSD, the relative two-dimensional position of light beams such as a laser beam on the active surface of the chip can be expressed as:
$$\begin{aligned} X= \,& {\frac{I_{x1} - I_{x2}}{I_{x1} + {I_x2}}} \nonumber \\ Y= \,& {\frac{I_{y1} - I_{y2}}{I_{y1} + I_{y2}}} \end{aligned}$$
(1)
where X represents the relative position of the laser spot on the X-axis and Y is the relative position on the Y-axis. Also \(I_{x1}\), \(I_{x2}\), \(I_{y1}\), \(I_{y2}\) are photocurrents measured in the direction indicated by the index, which in the following experiments are called Channel A, B, C and D, respectively.
A very important property that has been used several times in the following experiments is that because of the structure of the PSD, opposite channels have inverse correlation; meaning that when one of them increases, the other one decreases. This effect is easily shown in Fig. 1.
The major advantage of the lateral type PSD is that the accuracy of the output is not affected by the laser spot profile or its intensity distribution. The positional resolution of about 0.5 μm is sufficient for positioning in micro-level. Another outstanding property of this type is the position linearity over relatively large areas of the active surface of the chip. This is important for our task since it allows us to keep errors at a low level during filtering, rectifying, and mapping processes. The signal conditioning circuit of the PSD can be employed and found in [15].
Accuracy improvement methods and experimental validation
Noises and filtering
There are different sources of noise for the whole system. The micro-manipulator motor controls the laser, the ambient light on the PSD, the PSD board and its connections, the amplifiers, the probe, the dSPACE panel and control board—which is used to get the data from the PSD board—and finally any movements in the area that may cause the PSD or the laser to shake. Luckily, this part was set up on an anti-vibration table that was able to absorb movement noises to some acceptable degree, but there were still lots of other noises. A set of tests were designed and run to measure each of these noises and their impact on the system. The dSPACE noise is the most negligible noise as it produces a noise that results in < 1 μm movement in each direction which is shown in Fig. 2a. This noise is probably because of the dSPACE internal oscillator crystal. Another test measures the noise that the dSPACE and the PSD produce together but without any laser beam, meaning that it just shows the effect of ambient light and the noise of the PSD board. This is shown in Fig. 2b. We also noticed that the micro-manipulator motor that moves the laser has a considerable noise. This can be seen when comparing Fig. 2c, d. And finally, the noise that the whole system produces when everything is on and working is shown in Fig. 2d. Notice that in all of these experiments, the motor is not receiving any command to move so the noise of the system is causing a vibration as high as almost 1 μm in each direction. Note that all the figures in Fig. 2 have been centered for easier comparison.
Fast Fourier transform (FFT) can be used as a powerful tool for analyzing and measuring noise signals as we can effectively measure the frequency content. Unfortunately, the only problem for this system is that, as it is shown in Fig. 3, the noise does not occur in any special frequency. In other words, the system has a noise that is more similar to white noise. This means that the low-pass filters, band-pass filters or similar approaches are not applicable for filtering out the noise of this system. But as in this experiment, the DC part of the signal is more important to us, and we can use other methods to eliminate the noise. One can just use an AC to DC converter, but that would remove useful information too.
Signal averaging is a signal processing technique applied in the time domain, intended to increase the strength of a signal relative to noise that is obscuring it. By averaging a set of replicate measurements, the signal-to-noise ratio, S/N, will be increased [16]. To prove this, suppose the noisy signal v(k) is sampled every T seconds:
$$\begin{aligned} v(kT)=v_s(kT)+V_{\text{noise}}(kT) \end{aligned}$$
(2)
If N partitions are composed, the averaged signal becomes:
$$\begin{aligned} y(kT)= & \sum _{i=1}^{N} v_s^i(kT) + \sum _{i=1}^{N} v_{\text{noise}}^i(kT) \nonumber \\&\forall k=1,2,\ldots ,M \end{aligned}$$
(3)
If the partitions are perfectly aligned and the signal is truly periodic, the desired signal adds up:
$$\begin{aligned} \sum _{i=1}^{N} v_s^i(kT) = N v_s(kT) \end{aligned}$$
(4)
However, for Gaussian noise with zero mean and a standard deviation \(\sigma _n\) (which also equals its rms value), we obtain
$$\begin{aligned} \sum _{i=1}^{N} v_{\text{noise}}^i(kT) = {\sqrt{N \sigma _n^2}} = {\sqrt{N \sigma _n}} \end{aligned}$$
(5)
Taking the ratio of (4) and (4), we can find the signal-to-noise ratio (SNR) after averaging N partitions:
$$\begin{aligned} {\text{SNR}}_N={\frac{Nv_s(kT)}{{\sqrt{N}} \sigma _n}} = {\sqrt{N}} \times {\text{SNR}}_1 \end{aligned}$$
(6)
Thus, we get an \({\sqrt{N}}\) improvement in the SNR.
As the previous figures have shown, the mean of the noise is zero and we know that signal and noise are uncorrelated, so signal averaging is the perfect solution in this case. The only disadvantage of this method is that it produces some amount of delay based on the period we use for averaging. The Simulink® modeling of this filter is shown in Fig. 4.
Here gain block gives us 1/T where T is the time delay of transport delay block in seconds. The result shows significant improvement in noise reduction. The signal before filtering shows a vibration of about 15 μm in each direction, but after the filtering, the movement is limited to 1–2 μm in each direction. This has been achieved without losing actual data. The filtered signal follows the actual signal perfectly and the maximum delay is < 50 ms.
X–Y mismatch and rotation correction
One of the problems with calibrating and actually using the data we get from the PSD is that the X- and Y-axes are not made perfectly perpendicular with each other in the PSD and also the PSD is not parallel with the motor that moves the laser. The first problem results in data that are not matched in just one direction and the second problem results in data that seem to be rotated a little bit. Notice that if the micro-manipulator axes were not perpendicular too, it would result in the same problem as the first one. To match the two Cartesian coordinates that are on the PSD chip surface and on the position sensing software interface, a rotation matrix \(\left({\begin{matrix} \cos \theta &{}-\sin \theta \\ \sin \theta &{}\cos \theta \end{matrix}} \right)\) has been used to correct the mismatch between the two coordinates, where \(\theta = 2.29\) is the calibrated mismatch angle between the coordinates. Similarly, to solve the problem of the X- and Y-axes not being perfectly perpendicular on the surface of the PSD, a skew matrix \(\left({\begin{matrix} 1&\tan \varphi \\ 0&1 \end{matrix}} \right)\) was used, where \(\varphi = -\,2.864\) was calculated. These corrections are shown in Fig. 5.
Distortion rectifying
The X- and Y-axes on the PSD have radial distortion. This means there is a deviation from the rectilinear projection. The type of radial distortion that the PSD has is called pincushion distortion. In pincushion distortion, the visible effect is that scanning lines that do not go through the center of the image are bowed inwards, toward the center of the image. To correct this distortion, different approaches were researched and employed. As an example, research in [17] developed a correction method for this distortion, while in this work the Brown’s distortion model [18, 19] was modified and employed.
$$\begin{aligned} x_{\text{u}}= \,& (x_{\text{d}} - x_{\text{c}})\left( 1+K_1 r^2 + K_2 r^4 + \cdots \right) \nonumber \\ y_{\text{u}}= \,& (y_{\text{d}} - y_{\text{c}})\left( 1+K_1 r^2 + K_2 r^4 + \cdots \right) \nonumber \\ r= \,& {\sqrt{(x_{\text{d}} - x_{\text{c}})^2 + (y_{\text{d}} - y_{\text{c}})^2}} \end{aligned}$$
(7)
where \((x_{\text{u}}, y_{\text{u}})\) is the undistorted point, \((x_{\text{d}}, y_{\text{d}})\) is the distorted point, \((x_{\text{c}}, y_{\text{c}})\) is the center of distortion and \(K_n=n\)th is radial distortion coefficient. For this distortion, \(K_1 = -\,0.62\) and \(K_2 = 0.28\) were measured.
Mapping validation
To evaluate the mapping performance after the coordinate rotation, correcting X–Y mismatches and rectifying the distortion, the laser diode mounted on the 3D precision moving stage was used to generate various laser traces onto the PSD. In Fig. 6, a meander pattern was used to scan the whole surface of the PSD using the micro-manipulator as the reference. It became clear that the distortion is very noticeable. Using the above-mentioned corrections on the previous \(X_s\) and \(Y_s\), the rectifying can be applied. The result as the rectified graph that is presented in Fig. 7 shows a very good mapping with the reference. It was measured that the mapping errors in X and X are < 20 μm which means < 2%. The results clearly verify the good mapping performance by using the developed methods.
The meander pattern presents an acceptable distortion rectifying, but it is actually a graph that just one of the parameters of X or Y changes at a time. To scan the biggest area as possible of the PSD surface, an Archimedean spiral was used. This spiral can be shown using this formula:
$$\begin{aligned} x^2+y^2=a^2\left( \tan ^{-1} {\frac{y}{x}}\right) ^2 \end{aligned}$$
(8)
The result presented in Fig. 8 verifies the previous finding, and both mapping errors in X and Y within the range of 1 mm are < 2%.
The scanning PSD microscopy
After achieving a PSD system with high reliability and accuracy, a new scanning PSD microscopy can be extended. The microscopy is based on the vanishing effect and multi-channel photocurrent feedback mechanism of the accuracy improved PSD. In this section, we will detail the findings on this new microscopy.
Photocurrent output and vanishing effect
After different tests, it became clear that the effect of blocking the laser beam can be determined by processing each of the 4 channels of the PSD individually. It was found that when there was a laser beam on the PSD, regardless of the position of the beam, each channel gives an output voltage of less than zero (because of the inverters in the PSD board), but when the light was blocked, they all quickly jump to zero. This effect is easily shown in Fig. 9.
Based on this finding and the measurement accuracy improvement methods, a scanning PSD microscopy is proposed and preliminarily implemented. The mechanism of the microscopy is based on processing 4 photocurrents from 4 input channels A, B, C, and D of the PSD and the developed accurate PSD mapping methodologies. Different methods were used to determine the exact point that the blocking of the laser occurs.
Three methods for finding blocking positions
Method 1 The first and the most accurate method is to monitor the smallest changes in two channels that are on opposite sides of the PSD. Using the property that was discussed in “The lateral effect PSD” section, it is known that these channels have inverse correlation meaning that when one of them increases, the other one decreases. On the other hand, from the previous section, it is known that when an object blocks the laser beam, each channel immediately translates to zero. This means they no longer have an inverse correlation. These facts are presented in Fig. 10 and are used in the first method.
The program works as it starts monitoring each channel from the beginning and as it determines that the channels are no longer in an inverse correlation, and it marks that point as the starting point of the block and, with a similar approach, finds the stopping point. By calculating these two points, it can correct the data in between and gives us the size of the object. This determination can be found out easily with this formula:
$$\begin{aligned} ((A(i)-A(i-1)) \times ((B(i)-B(i-1)) < 0 \end{aligned}$$
(9)
Notice it has been supposed that each current is uniform and changes smoothly, but in practice, it is not the case. As a result of this, the smallest noise can ruin this method and give a false positive. To overcome this problem, the program first finds a peak in one of the channels and then goes back to find the starting point. Unfortunately, this approach makes the first method unusable in online plotting as it needs to go back and forth in time. That is the reason for implementing the second method.
Method 2 The second method determines the starting and stopping points by monitoring A + B. The reason is, as it is shown in Fig. 10, the inverse correlation between two channels can eliminate each other when added together in normal situations, but when a block occurs, the addition of these channels can add up resulting in a bigger peak. This method is a bit less accurate as an exact specific point cannot be determined for every case, but the advantage is that it can be used to correct the data online and generate the plots simultaneously. In this method, each time that A + B becomes bigger than a specific set number (in this case, − 0.9), a pass is marked and the starting and stopping points of the block can be extracted easily. Figure 11 presents the effect of two passes on A + B.
The second method covers most of the situations unless the object is transparent. In such a case, the laser beam would not be blocked completely and the result would be just some disturbance. Monitoring A + B does not help as it does not clearly become bigger than a set point, so the third method was designed.
Method 3 The third method uses the fact that when an object, even a transparent one, blocks the laser beam, there would be a disturbance in both A and B. To monitor this disturbance, the derivative of A + B was used to find the point that A + B starts changing rapidly. These sudden changes in A + B determine a disturbance and consequently a pass. Figure 12 shows both channels A and B when the laser passes a transparent object. Figure 13 shows that the derivative of A + B has some considerably big peaks at the same time. This is because of the fact that it is showing the sudden changes in A + B which is a result of the disturbance in each of the channels.
In the end, all three methods were used to find the starting and stopping points of each block. Based on these times and as the X and Y positions of the beam for any given time is known, the program can calculate the distance that the laser beam was blocked meaning the dimensions of the object.
Measurements using the scanned results
At this point, we have all the requirements to measure the dimensions of an object. An experiment was designed to verify this ability. In this experiment, an SMD capacitor (1.57 mm × 3.05 mm × 1.57 mm) was placed on the PSD surface. The laser performs a basic scanning and passes the object three times and the program uses the above-mentioned methods to find each blocking of the laser beam. The results and measurements for both channels A and B are shown in Fig. 14.
Using the time of the starting point and stopping points of each pass, the program also shows the passes on an X–Y plot alongside the measurements of the object dimensions. This is shown in Fig. 15. Note that in this figure, broken lines were added later to represent the actual position of the object on the surface of the PSD.
After extensive experiments with different objects, it was determined that the measurements are promisingly accurate. Repeating the result gives a standard deviation of < 6 μm, and the error in the full range is < 4%. It should be noted that the diameter of the laser beam we used is about 1 mm itself. So by using a laser that is capable of producing a smaller beam and focusing it properly, the measurements could improve significantly.
As it was discussed before in “The scanning PSD microscopy” section, there is a method for performing the same measurements for transparent objects. To verify that, another experiment was designed. In this experiment, a glass micropipette with an outer diameter of exactly 1 mm was placed on the surface of the PSD and the laser beam scans the surface once from side to side. By monitoring the derivative of A + B, the pass can be identified and is shown in Fig. 16.
Extensive experiments were conducted to measure the size of the transparent glass micropipette and it proves that the measurements are repeatable with a small error as reported in prior experiments, with a standard deviation of < 6 μm. This shows that even transparent objects can be measured with this method. It is very important to note that these experiments are just preliminary proof-of-concept examples to test the abilities of the system and introduce a new method of microscopy. There are some problems with these experiments that make the final conclusion on the accuracy a little dubious. For example, these experiments were done without a good certainty that the objects are perfectly parallel to the channels. A slightly rotated object can cause the system to find different values for its dimensions as the laser beam is now not perpendicular to the sides of the object and it is more like a diagonal path that enters one side and exits another one with an angle. Another problem is that in these experiments, we used SMD resistors as an object and the dimension of different resistors might not exactly follow the suggested dimensions of the datasheet. Others factors might influence the result too. But the fact that the results are repeatable with very small error and standard deviation proves that the system is promisingly working.