## Abstract

Interferometry with single-point detection is widely used for the precise measurement of short-range displacements, when its range is less than a quarter of the wavelength. The moiré technique is also used for the same purpose when the displacement is smaller than half the period of the superimposed gratings. In both interferometry and the moiré technique, the response function of the system takes a periodic form by increasing the displacement value. For larger values of the displacements, the moment the detected signal experiences one of the extremum values, the signal trend does not reflect the direction of the motion, and it leads to an ambiguity in the motion reconstruction. Since an interference pattern has a sinusoidal intensity profile, by using three-point detection and the aid of conventional spatial phase shifting, we have recently proposed a new method for chasing moving interference fringes and were able to remove the disability of the interferometry in discriminating of the direction of motion for long-range displacements (see Opt. Laser Technol. **103**, 387 (2018)). But the transmission function of a moiré pattern is a triangular or trapezoidal function. Therefore, the conventional phase shifting algorithms are not applicable for moiré fringe chasing. In this work, first we introduce a new method for data acquisition in moiré-based displacement and vibration sensors. We use a three-point intensity detection method for chasing moving moiré fringes and we introduce a new algorithm based on the data of three point detectors to remove the disability of the moiré technique to discriminate the direction of motion for long-range displacements. With the aid of three-point intensity detection, a high speed, high accuracy, and long-range displacement sensor based on the moiré technique is built. This sensor can be used in the calibration of mechanical positioning sensors. Also, using a data acquisition procedure we have introduced, in a moiré-based vibration sensor, the vibration parameters can be determined in a simple and reliable manner.

© 2018 Optical Society of America under the terms of the OSA Open Access Publishing Agreement

## 1. Introduction

In a variety of mechanical systems such as numerical control (NC) milling machines and in some optomechanical devices, there are positioning sensors that read the position of a movable part. These sensors can be made using different technologies, such as optical or magnetic encoders, capacitive position sensors, etc. One of the optical methods used for this purpose is the moiré technique, which can magnify a very small mechanical displacement with a large shift in the moiré fringes, and it has some other advantages such as low cost, high reliability, and simple setup. The moiré fringe displacements can be determined by single-point detection [1–3], one or two pairs of point detectors [4–6], or by inspection of the successive frames of a movie taken by a CCD camera from the fringes pattern during the object displacement [7]. Another way is the use of a pair of specially made gratings, in which each of the superimposed gratings composed of four adjacent parts, each part being a small piece of a grating with equidistance parallel lines but the lines in successive parts are phase shifted by one quarter of the grating period [8,9].

The single-point detection method disables to discriminate the direction of displacement when the detected signal experiences one of the extremum values. In other words, in this case, the signal trend does not reflect the direction of the motion and it leads to an ambiguity in the motion reconstruction [1–3].

The use of one or two pairs of detectors in the detection part of a moiré-based displacement sensor discriminates a change in the direction of a given displacement. Although, in principal, one pair is adequate to acquire a bidirectional displacement data, in practice four point detectors are normally used [4–6]. Since all these detection approaches [4–6,8,9] consider that the signals have sinusoidal forms, the accuracy and the resolution of the displacement measurements depend on whether the signals are sinusoidal [4]. As in fact in the moiré fringes of rotation the intensity profile of the resulting fringes has a triangular form, the sinusoidal assumption for the signals is not valid. Also, in the parallel moiré fringes, in which lines of the superimposed gratings are parallel, again a sinusoidal signal obtained by an averaging over the fringes profile with a penalty of reduction in the resolution of the displacement measurement.

In the use of a CCD camera instead of a single-point detector, as the volume of data increases, the sampling rate decreases, remarkably. A low sampling rate recording system is unable to measure a high-speed movement or a high-frequency oscillation motion. On the other hand, for high frame rates, typically over than a 10 kHz rate, the required CCD camera are expensive, volume of the data is huge, and the data transferring processes are time-consuming. Therefore, by a high frame rate CCD camera, a real-time measurement is impossible.

In this work we present a three-point intensity detection method for discrimination of the motion direction for long-range moiré fringes displacements, consider the triangular form of the intensity signals, and present a reliable method for the displacement sensing by chasing moving moiré fringes.

In parallel, we have recently used the three-point spatial phase shifting method for discrimination of the direction of motion in the homodyne laser Doppler vibrometry [10]. As an interference pattern has a sinusoidal intensity profile, the three-point intensity detection method provides implementing of the well-known phase shifting method in the spatial domain. At the first glance, it seems that the use of the three-point intensity detection method for chasing of the moiré fringes is the same as the case of interference fringes chasing. Since a moiré pattern has a triangular (or trapezoidal) transmission profile, therefore in this case the conventional phase shifting method does not directly applicable, and some further considerations should be taken into the account. In fact, in the previous works presented in Refs. [4–6,8,9] by considering a sinusoidal form for the signals, the accuracy and the resolution of the displacement measurements are affected.

In this work we theoretically and experimentally show that by knowing the spatial period and transmission intensities of only three points over a period of moiré fringes they still are enough to calculate the displacement value. The use of three point detection remarkably increases the sampling rate, and for this reason, the proposed three-point detection method can be easily extended to the ultrasound regime and seismometry.

The three-point detection moiré-based displacement sensor can also be used on a wide range of microcontroller systems, strain and crack gauges, vibrometers, and so on.

It should be mentioned that, the use of moiré pattern of circular gratings provides measuring the accumulated displacement value of a motion [11]. In recent years a number of crack gauges are designed and applied using this kind of moiré patterns [11–16]. In this method the resulting moiré pattern is recorded by a CCD camera, therefore it disables to measure oscillating motions. Also, it cannot be able to measure long-range displacements without a decrease on the precision of the measurement. Finally, it is worth noting that for accurate small deformation distribution measurement the sampling moiré method is alternative [17]. This method is also applicable for small values of displacements.

## 2. Moiré technique and displacement sensing

Moiré technique is a simple, low cost, and reliable method for detection of displacement and the other parameters related to the displacement. Also, moiré technique in conjunction with the Talbot effect which is named moiré deflectometry is widely used for the light beam deflection measurement and the other related parameters such as wave-front sensing [18], atmospheric turbulences [19], etc. Moiré technique is based on moiré pattern created by superimposing two optical gratings. An optical grating can be created by drawing parallel straight opaque lines frequently on a transparent sheet. The distance between two transparent or opaque consecutive lines and the number of transparent or opaque lines per unit of length are called grating period and grating frequency, respectively. For an amplitude grating, the ratio of the width of the transparent lines to the grating period is called opening number. A Ronchi grating has an opening number equal to $1/2$ in which the transparent and the opaque lines have the same width. As illustrated in Fig. 1 when two similar gratings superimposed in a way that their lines directions make small angles $+\theta /2$ and $-\theta /2$ by the x-axis, respectively, a new periodic pattern with a larger period of ${d}_{m}=\frac{d}{2\text{sin}\left(\theta /2\right)}$ appears which is called moiré pattern, where $d$ is the period of the gratings.

When the angle between the gratings lines is small enough, period of the moiré fringes ${d}_{m}$is more larger than the gratings period *d*. Also, if one of the gratings moves in its plane in a direction perpendicular to its lines direction with a value of *d*, the moiré pattern moves with a value of ${d}_{m}$ perpendicularly to its fringes direction. As ${d}_{m}$ is more larger than $d$one can convert small mechanical displacements to large optical displacements. This conversion can be used to measure small displacements. Based on this method, relative position of the superimposed gratings (position of sensor) can be determined by chasing or measuring the displacement of the moiré fringes.

#### 2.1 Theory

The transmission profile of a periodic grating in which its lines are parallel to the x-axis can be expressed by the Fourier series in the following form:

where*d*is the grating period and ${a}_{k}$is the k

^{th}complex coefficient of the Fourier series. Consider a moiré pattern forms by two similar gratings placed on each other and their lines having small angles $-\theta /2$ and $+\theta /2$ with the x-axis, respectively. As illustrated in Fig. 1 resulting moiré fringes are parallel to the y-axis. The transmittance function of the superimposed structure can be obtained by

*S*with a length of

*l*and width of

*e*is set to scan the moiré pattern, see Fig. 1. The mean value of the light intensity passes through the slit

*S*, when center of the slit is located at

*x*, can be given by

*T(x, y)*is the moiré pattern transmittance. By placing Eq. (2) in Eq. (3) we have

Using ${d}_{m}=\frac{d}{2\mathrm{sin}(\theta /2)}$we get

The maximum and minimum values of Eq. (6) appear at $x=m{d}_{m}$ and $x=m(1+\raisebox{1ex}{$1$}\!\left/ \!\raisebox{-1ex}{$2$}\right.){d}_{m}$, respectively, where m = 0, 1, 2, ... . Therefore

Since the transmittance function of a periodic structure can be considered as an even function, we can remove the imaginary term (i.e. odd term) in Eq. (6). Now after dividing Eq. (6) by Eq. (7) the average transmittance function of the resulting pattern along*x*direction can be obtained as

#### 2.2 Disability of single-point detection in discrimination of the direction of motion

Most of the moiré-based displacement and vibration sensors have been made previously, are based on the single-point detection method. Figure 3 illustrates structure of a typical single-detector moiré-based displacement sensor.

In this sensor the light source and the detector are fixed, one of the gratings is also fixed in a specified position, and the other grating is movable perpendicularly to its lines direction. By moving the floating grating, the fringes of the moiré pattern move. The movement is recorded by the detector, and by considering the displacement direction, the sensor position is calculated.

Figure 4 illustrates the moiré patterns and simulations of the average transmittance functions of a typical moiré-based displacement sensor in different positions. For the case of Fig. 4(a), where a light fringe lies in front of the detector, we consider the moiré pattern as the reference pattern, and we attribute a position of ${d}_{m}/2$ to the sensor. Figure 4(d) shows the simulation of the average transmittance function over the central fringe of the reference moiré pattern.

The sensor structure shown in Fig. 3 has a major disability that makes it unreliable. Based on cosine term Eq. (12) is an even function and ${I}_{a}(-x)={I}_{a}(+x)$. It means by the value of ${I}_{a}(x)$, in general, we cannot determine the location of the slit *S* uniquely. The single-detection method is not able to determine the displacement value in a scale larger than a half of the grating period. Consider a case that a light fringe is placed in front of the detector at $x={d}_{m}/2$, see Fig. 4(a), and the detector detects a maximum intensity, see Fig. 4(d). Now if the pattern displaces $\Delta {d}_{m}$ to the left, Fig. 4(b), or right, Fig. 4(c), for both displacements, the detector detects the same intensity $({I}^{\prime}={I}^{\u2033})$, Figs. 4(e) and 4(f). In other words, there is the same intensity value for the displacements in two opposite directions. This duality can also be verified by Eq. (12). The same effect occurs at the vicinity of the dark fringes. It means that a single-detector moiré-based displacement sensor does not able to make a difference between two displacements $\pm \Delta {d}_{m}$ of a fringe around an initially extremum intensity location, say at the positions $\frac{{d}_{m}}{2}-\Delta {d}_{m}$ and $\frac{{d}_{m}}{2}+\Delta {d}_{m}$. This disability can be verified for all the other fringes.

#### 2.3 Fringe chasing with three-point intensity detection

Now we show that using three point detectors how can remove the above-mentioned disability of the moiré technique. In this method, three point detectors are used at certain locations along a line perpendicular to the moiré fringes direction, Figs. 5(a)–5(c). If the reference moiré pattern in Fig. 5(a) moves $\Delta {d}_{m}$ to the left [Fig. 5(b)] or right [Fig. 5(c)] side some differences are created to make the calculation reliable. Although the central detector ${D}_{2}$ still detects the same value ${I}_{2}$ for ${d}_{m}\pm \Delta {d}_{m}$but there is two auxiliary detectors ${D}_{1}$ and ${D}_{3}$detect different values. The difference between values of the auxiliary detectors is our solution to determine motion direction of the fringe or position of the sensor. Based on this solution if the detected value of ${D}_{1}$ is larger than the value of ${D}_{3}$, say ${I}_{1}>{I}_{3}$, current position is between ${d}_{m}/2$ and ${d}_{m}$ and if ${I}_{3}>{I}_{1}$the current position is between 0 and ${d}_{m}/2$, respectively, see Figs. 5(e) and 5(f).

## 3. Displacement sensor and its operation

The displacement sensor we have made has three main parts which are mechanical, optical, and optoelectronic parts. The mechanical part has a precisely linear moving system and optical has a moiré pattern made by two Ronchi gratings. The optoelectronic part has an array detector and a light source. One of the gratings (G1) of the moiré pattern is connected to the movable mechanical part. The connection is such that the moiré fringes move perpendicularly to its lines direction when the floating grating moves in the direction perpendicular to its lines. By moving the moiré pattern fringes the processor unit chases the fringes motion using the data sent by the array detector placed just in front of the moiré pattern, and calculate the position of the sensor uniquely and reliable. The precision linear motion part of the sensor is provided by an *HIWIN MGN7CH* linear guide system fixed on a chassis. The light array detector is a *TSL1401* 128 × 1 linear photo-diode array with a pixel size of $63.5\mu m(H)\times 55.5\mu m(W)$. Two Ronchi gratings with the same periods of $50\mu m$ were cut in sizes $20mm\times 50mm$ (G1) and $8mm\times 10mm$ (G2). The bigger grating (G1) is pasted on a thick transparent sheet and the other (G2) is pasted onto the lighting surface of the array detector. A holder made by aluminum profile to install G1 on the carriage of the linear motion part. In other words, G1 is mounted on the holder and then the holder is mounted on the carriage of the linear motion part. A schematic diagram of the moiré sensor unit is shown in Fig. 6(a). Figures 6(b)–6(d) show three images of the displacement sensor. In Figs. 6(a) and 6(d) the sensor’s parts are indicated by numbers. As shown in Figs. 6(a)–6(d), G1 is very close to G2 that forms the moiré pattern with a period of $410\mu m$ just in front of the array detector.

The direction of the moiré fringes formed by G1 and G2 are perpendicular to *TSL1401* detection line. The light source beam which is provided by an *IR LED* falls the moiré pattern on the detection area of the array detector. By moving the movable part of the sensor, moiré fringes move and array detector which observes the pattern continuously, grabs a linear image frame and sends the data in a 1-D matrix to output.

#### 3.1 Calculation of the position

For determining position of the detector from the measured values of the intensities, the resulting experimental data are fitted to the theoretical values of Eq. (12). For fitting the data of ${D}_{2}$ detector to Eq. (12), a regulation of the intensity data is needed. Then in step 1, a mathematical normalizing procedure is applied both to Eq. (12) and to the experimental data of ${I}_{2}$ as below:

${I}_{2,\mathrm{min}}$ and ${I}_{2,\mathrm{max}}$ can be recorded in a whole period of the moiré pattern. In step 2, for a given moiré fringe we considerIn the left term of Eq. (15), for all values of x, ${I}_{a,normalized}(x)$ is known, but in the right side,*x*is unknown and ${I}_{2,normalized}(x)$is known by provided data from the array detector and Eq. (14). Then in step 2, we need to find a position

*x*for known value of ${I}_{2,normalized}$ by equalizing ${I}_{2,normalized}$ and ${I}_{a,normalized}$. Thus the sensor displacement can be determined by calculating the inverse of ${I}_{a,normalized}$ as follows:where $x$ is the inverse function of ${I}_{a,normalized}$ and $m$ is the absolute number of the fringes passed in front of ${D}_{2}$. Calculation of Eq. (16) is done by numerical solution method. The initial value of Eq. (16) is obtained from the array detector. The data sent by array detector is a 1-D matrix which is the profile matrix of the moiré pattern. The matrix contains data about the extremum and period of the moiré pattern. In the matrix, the microcontroller considers three consecutive matrix elements as the values of ${I}_{1}$, ${I}_{2}$, and ${I}_{3}$, then finds the extremum values of ${I}_{2,\mathrm{min}}$and ${I}_{2,\mathrm{max}}$ contains ${D}_{2}$ intensity $({I}_{2})$. In this sensor, the values of elements 4-6 (values of pixels 4-6) is considered as ${I}_{1}$,${I}_{2}$ and ${I}_{3}$, respectively, and we have programmed the microcontroller to measure displacement in precision of $5\mu m$.

Since Eq. (12) is an even function, Eq. (16) will have two answers in $[md,md+d/2]$ and $[md+d/2,(m+1)d]$ that one of them leads to a wrong result; therefore we used subtraction of auxiliary detectors intensity to choose correct answer as follows:

#### 3.2 Sensor driving and results

The moiré-based displacement sensor gives the raw data of a continuous linear image frame of the moiré pattern. It needs to be analyzed the time series of detected intensities by a processing unit, and delivers the displacement values in a real time. For this purpose, a processing unit provided by an *LPC1768 cortex M-3* microcontroller is used to drive the sensor. The program of the microcontroller is written based on Eqs. (13)–(17) in $Keil\mu Vision4$ compiler and programmed by *J − link* programmer. The use of this kind of processing unit, in addition of providing a real time determination of the displacement values, significantly moves down the price of the sensor. To verify the sensor operation, we added a $2.5\mu m$ fine micrometer screw made by *Standa* and a spring to make connection between movable part of the sensor and the screw head, see Figs. 6(b) and 6(d). Verification of the sensor operation is shown in Figs. 7 and 8.

Figure 7(a) shows the plots of simulation of Eqs. (13) and (14) for the same positions and absolute subtraction of them. As shown in Fig. 7(a) there is over 85% similarity between the simulation and experimental data.

Figure 7(b) illustrates simulation and experimental plots of normalized subtraction of auxiliary detectors intensities $({I}_{3}-{I}_{1})$ rescaled in a range of (−1.0, 1.0). This subtraction is used to choose the correct answer. As expected, in the simulation, the sign of $({I}_{3}-{I}_{1})$ changes at extremum values of ${I}_{2}$, precisely. Although the sign of the experimental plot does not change exactly at $(2m+1)d/2$, it satisfies the accuracy of the sensor. In other words, the drift of the experimental plot at $(2m+1)d/2$is less than $5\mu m$.

Figure 8 shows verification of the results of the sensor output at a range 0 to $150\mu m$. As shown in Fig. 8 the position sensed by the sensor fits the position set by the fine screw and this accordance is independent of direction of motion.

## 4. Conclusion

In this work, we have considered the triangular form of moiré fringes and introduced a three-point intensity detection method for chasing moving moiré fringes, overcoming the disability of the moiré technique in discriminating the direction of motion for long-range displacements. Using the moiré technique and the three-point intensity detection method, a high speed, high accuracy, portable, and long-range displacement sensor was built. The operation of the constructed sensor was verified by measuring some given linear displacements and returns. This sensing procedure can be used in the calibration of mechanical positioning sensors and can also be extended for measuring submicron displacements using precision gratings.

As mentioned above, in some previous works [4–6], a sinusoidal profile was considered for the moiré fringes and two pairs of point detectors were used for chasing moving moiré fringes. It is clear that in all those works, assuming an approximate sinusoidal form for the profiles, influenced the accuracy and resolution of the displacement measurements. The effect of incorporating a triangular profile instead of a sinusoidal profile for the moiré fringes on the precision of the displacement and vibration measurements is under detail study.

## Funding

IASBS Research Council (G2018IASBS12632).

## References

**1. **K. Madanipour and M. T. Tavassoly, “Submicron displacements measurement by measuring autocorrelation of the transmission function of a grating,” Proc. SPIE **8082**, 80823O (2011). [CrossRef]

**2. **S. Esmaeili, S. Rasouli, F. Sobouti, and S. Esmaeili, “A moiré micro strain gauge,” Opt. Commun. **285**(9), 2243–2246 (2012). [CrossRef]

**3. **S. Rasouli, S. Esmaeili, and F. Sobouti, “Design and construction of a seismometer based on the moiré technique: detailed theoretical analysis, experimental apparatus, and primary results,” Int. J. Opt. Photon. **10**, 3–10 (2016).

**4. **K. Patorski, *Handbook of the Moiré Fringe Technique* (Elsevier Science, 1993), chap. 5.

**5. **A. T. Shepherd and G. S. Walker, British Patent 810478 (1995).

**6. **L. Wronkowski, “Signal transducing in optoelectronic measurement systems based on the moiré phenomenon,” Opt. Eng. **31**(3), 505–516 (1992). [CrossRef]

**7. **S. Rasouli, Z. Eskandari, and Z. Y. Abedini, “Landslide monitoring using moiré technique,” Geosciences **22**, 237–240 (2012).

**8. **A. H. McIlraith, “A moiré fringe interpolator of high resolution,” J. Sci. Instrum. **41**(1), 34–37 (1964). [CrossRef]

**9. **J. Zhu, S. Hu, J. Yu, S. Zhou, Y. Tang, M. Zhong, L. Zhao, M. Chen, L. Li, Y. He, and W. Jiang, “Four-quadrant gratings moiré fringe alignment measurement in proximity lithography,” Opt. Express **21**(3), 3463–3473 (2013). [CrossRef] [PubMed]

**10. **M. H. Daemi and S. Rasouli, “Fringe chasing by three-point spatial phase shifting for discrimination of the motion direction in the long-range homodyne laser Doppler vibrometry,” Opt. Laser Technol. **103**, 387–395 (2018). [CrossRef]

**11. **B. Košťák, “A new device for in-situ movement detection and measurement,” Exp. Mech. **9**(8), 374–379 (1969). [CrossRef]

**12. **M. D. Rowberry, D. Kriegner, V. Holy, C. Frontera, M. Llull, K. Olejnik, and X. Marti, “The instrumental resolution of a moire extensometer in light of its recent automatisation,” Measurement (Lond) **91**, 258–265 (2016). [CrossRef] [PubMed]

**13. **J.-L. Piro and M. Grediac, “Producing and transferring low-spatial-frequency grids for measuring displacement fields with moiré and grid methods,” Exp. Tech. **28**(4), 23–26 (2004). [CrossRef]

**14. **X. Marti, M. D. Rowberry, and J. Blahůt, “A MATLAB code for counting the moiré interference fringes recorded by the optical-mechanical crack gauge TM-71,” Comput. Geosci. **52**, 164–167 (2013). [CrossRef]

**15. **G. T. Reid, R. C. Rixon, and H. I. Messer, “Absolute and comparative measurements of three-dimensional shape by phase measuring moiré topography,” Opt. Laser Technol. **16**(6), 315–319 (1984). [CrossRef]

**16. **I. Baroň, L. Plan, B. Grasemann, I. Mitrovic, W. Lenhardt, H. Hausmann, and J. Stemberk, “Can deep seated gravitational slope deformations be activated by regional tectonic strain: first insights from displacement measurements in caves from the Eastern Alps,” Geomorphology **259**, 81–89 (2016). [CrossRef]

**17. **S. Ri, M. Fujigaki, and Y. Morimoto, “Sampling moiré method for accurate small deformation distribution measurement,” Exp. Mech. **50**(4), 501–508 (2010). [CrossRef]

**18. **S. Rasouli, M. Dashti, and A. N. Ramaprakash, “An adjustable, high sensitivity, wide dynamic range two channel wave-front sensor based on moiré deflectometry,” Opt. Express **18**(23), 23906–23913 (2010). [CrossRef] [PubMed]

**19. **S. Rasouli, “Use of a moiré deflectometer on a telescope for atmospheric turbulence measurements,” Opt. Lett. **35**(9), 1470–1472 (2010). [CrossRef] [PubMed]