Application Research of Frequency-Modulated Continuous-Wave Displacement Sensor Based on Zero-Crossing Phase Detecting Algorithm

Frequency-modulated continuous-wave (FMCW) interference, as a new technology of laser interferometry, has the advantages of length traceability, large range, high accuracy, simple structure, and optical ﬁber transmission. Based on the formula of FMCW laser interference displacement, a zero-crossing phase detection algorithm is proposed, which can accurately calculate the initial phase of a cosine signal in a modulation period, and it is successfully applied to the contact laser interference displacement sensor. The experimental results show that the FMCW technology based on the zero-crossing phase detection algorithm can achieve the technical speciﬁcations of the contact displacement sensor with a measurement range greater than 15mm and the standard deviation is less than 0.01 μ m. The conversion of noncontact measurement to contact measurement can realize the direct measurement of workpieces with complex surface conditions on the production line, breaking through the limitation of optical measurement and expanding the application of optical ﬁber interferometry.


Introduction
With the rapid development of modern technology and industry, many fields such as large-scale machining and equipment manufacturing have put forward higher requirements for the accuracy of part size measurement. ese measurements often require large-volume workpiece measurement, field measurement, and measurement under difficult conditions. Laser-ranging technology has many advantages, such as high measurement accuracy, long working distance, and strong anti-interference ability, which can meet the requirements of industrial scientific research on ranging technology in other fields. e emergence and wide application of laser-ranging technology solve the problem that traditional measurement technology cannot solve, so the research and application of laser measurement technology is very important. Frequency-modulated continuous-wave (FMCW) laser-ranging system is a kind of noncontact laser interferometric displacement measurement technology which is developing rapidly and widely used [1][2][3]. It has the advantages of high measurement accuracy and long working distance. FMCW laser-ranging technology combines the advantages of interference ranging technology and pulse ranging technology, which not only ensures that the measurement distance is far enough but also ensures the high precision of distance measurement. Compared with other laser-ranging methods, the interference signal obtained by FMCW interferometry is a time-dependent dynamic signal, which has a stronger anti-interference ability. FMCW interference uses a DFB semiconductor laser with a lower cost and simpler structure, so it has a broad development prospect in large-scale and high-precision measurement [4][5][6].
Iiyama [7] introduced a photoelectric negative feedback loop containing a reference interferometer and a phase comparator in the FMCW system to perform a nonlinear correction of the laser frequency. e spatial resolution of the ranging system was improved from 12 mm to 1.3 mm.
Schneider [8] adopted the calibration interference signal to compensate for the laser frequency modulation nonlinearity; the ranging accuracy was 0.5 mm. Jesse Zheng [9] conducted in-depth research on the FMCW theory and subsequently achieved a series of results [10][11][12]. Kakuma [13] built an FMCW interference system with a reference interferometer, which, respectively, conducted the optical frequency modulation of the two vertical-cavity surface-emitting lasers in opposite scanning directions and eliminated the offset error by averaging the phase shifts of the two beat frequency signals. When the target motion is 0.37 mm, the measurement error was reduced from 0.69 mm to 0.018 mm. e American National Institute of Standards and Technology Baumann [14] set up a set of optical frequency comb corrected FMCW Radar ranging system in the laboratory and realized the scanning measurement of cactus with a diameter of 75 μm within 4 m, where a measurement accuracy reached the submicron level. Mateo and Barber [15], researchers at the University of Montana, based on the principle of FMCW laser ranging, used a three-sided measurement method to scan a number of different shapes of processed aluminum plate with a distance of 1.5 m, and the repeated accuracy was about 100 μm. At present, high-precision FMCW ranging technology requires cooperation targets, which greatly limits the application of parts detection at the production sites.
Optical interferometry measurement technology has the advantages of high speed, high-precision, noncontact, antielectromagnetic interference, and wide measurement range; of course, it also has its application limitations. For example, there are requirements for the surface quality of the workpiece to be tested: there should be no iron filings, no oil film, no roughness, or too smooth surface; the measured surface angle cannot be too large; the error of the air disturbance substitution is large, etc., so the application of an optical measurement is restricted to the measurement of workpieces in the production line. en, combined with the characteristics of contact measurement and noncontact measurement, the optical system is transformed into contact measurement, which can give full play to the advantages of high precision and a large range of optical measurement. With the advantages of contact measurement, the application range of optical measurement can be expanded. For example, just finished from the machine tool, the surface of the workpiece has oil film and iron filings, and the contact method can easily achieve direct measurement. e processing and manufacturing site environment is complex, and this method can effectively prevent electromagnetic interference and avoid air disturbance. e surface inclination angle of free-form surface and special-shaped surface parts changes greatly, and the contact method can also be used to detect them directly. erefore, this method has certain application advantages and is worth popularizing.

Basic Principle of FMCW Ranging
FMCW laser-ranging system is a kind of ranging system which uses a frequency-modulated laser as a signal carrier to obtain the distance and velocity information of the target object. In this system, the optical frequency is linearly modulated by the laser, and the time delay caused by the distance of the target is reflected in the form of the beat frequency of the interference signal. e difference frequency signal generated by the beat frequency is proportional to the distance to be measured, and the distance of the target to be measured is calculated by using this relationship.
As shown in Figure 1, the LFM laser generated by the DFB laser is divided into two beams after passing through the collimating lens, one of which is the reference beam. After being reflected by the reference mirror in the collimator, it enters the photodetector through the circulator. e other is the measurement beam, which is reflected by the measurement target mirror and interferes with the reference beam on the photodetector to generate a dynamic beat signal. e measured distance can be calculated by demodulating the beat frequency signal with frequency and phase. According to electromagnetic theory, a light wave is a kind of propagation of vibration electromagnetic field. If the electromagnetic field of a point light source vibrates along a fixed direction with a single frequency, the vibration electric field E (t) can be expressed as [16] where E 0 is the vibration amplitude, φ is the phase, t is the time, φ 0 is the initial phase, v is the temporal frequency, T is the temporal period, and ω is the temporal angular frequency. us, the signals of the measurement beam E 1 (t) and the reference beam E 2 (t) can be expressed in the time domain as follows: en, the beat signal generated by the interference of the two beams is expressed as Since the above two light waves originate from the same coherent FMCW light source, the initial phases of the two light waves are correlated. e light intensity of the synthesized field is 2 International Journal of Optics where I 0 is the average intensity of the beat signal I 0 � I 1 + I 2 , V is the contrast of the beat signal V � 2 ��� � I 1 I 2 /I 1 + I 2 , and τ � τ 2 − τ 1 is the delay time of the second wave (usually called the signal wave) with respect to the first wave (usually called the reference wave).
In FMCW laser interference, the frequency modulation of the laser source can be a sawtooth wave, triangle wave, and sine wave. In this paper, the theory of FMCW interferometry is analyzed with a sawtooth frequency linear modulation light source as an example. Two beams are output by the modulated laser source, and the interference occurs at a point in space after propagating through different paths. e angular frequency waveforms of the two coherent light waves and the beat signal generated can be described as the curve shown in Figure 2, where the solid line represents the angular frequency of the reference light and the dotted line represents the angular frequency of the signal light.
When these two waves interfere, the interference signal light intensity I(τ, t) can be expressed as where I 1 and I 2 are the intensities of the reference wave and signal wave, I 0 is the average intensity of the beat signal, and V is the contrast of the beat signal. It can be concluded from the above equation that the relationship of the OPD between the reference wave and the signal wave in one modulation period is as follows: where Δv is the optical frequency modulation excursion, v m is the frequency the modulation signal, c is the speed of light in free pace, λ 0 is the central optical wavelength, and v b andφ b0 are the frequency and the initial phase of the beat signal.
It can be seen from equation (7) that each time the OPD changes by one wavelength, the initial phase of the cosine signal changes 2π, and the beat signal shifts by one cycle. erefore, the OPD can be calculated by measuring the amount of change (phase shift) of the initial phase of the beat signal. Usually, the calculation of φ b0 uses the cycle counting method, which continuously records and accumulates the amount of change in the phase shift during the measurement to calculate the total phase shift amount Δφ b0 during the entire measurement process.

Phase Algorithm Based on Zero-Crossing Method
3.1. System Design. As shown in Figure 3, the FMCW laser interferometry system is based on the structure of the Fabry Perot FMCW laser interferometer. e optical fiber displacement sensor consists of a single-mode DFB semiconductor laser, optical fiber circulator, optical fiber collimator, partial mirror, total mirror (object to be measured), and photodetector.
e DFB laser emits a frequency linearly modulated frequency-modulated continuous-wave laser. e laser is coupled to the input port 1 of the optical circulator through an optical fiber and output from the forward adjacent port 2 of the optical circulator. e output light is incident to the optical fiber collimator through the optical fiber, and part of the light is reflected by the optical fiber collimator through the partial mirror. As the reference light, part of the light is transmitted to the total reflector attached to the surface of the moving object to be measured and returned as the signal light. e signal light and the reference light are superposed and interfered at the output port 3 of the optical circulator to form a beat signal. e interference optical signal is converted into an electrical signal by the photodiode, processed by amplifying and filtering circuit, International Journal of Optics and converted into a digital signal by the built-in ad of stm32f407 microprocessor. Finally, the relative displacement of the target is accurately measured by the phase discrimination algorithm.

Phase Detection Algorithm.
According to formula (7) in the second section, as long as the amount of change in the initial phase of the cosine signal between two adjacent modulation periods is calculated, the amount of change in the displacement between the two modulation periods can be calculated. So, the primary goal of the phase detection algorithm is to calculate the initial phase of a cosine signal in a modulation period. Figure 4 shows the flow chart of the FMCW interference signal phase detection algorithm. e cosine signal from the beat frequency is subjected to amplitude correction, software filtering, searching for extreme values, and zero-point positioning to calculate the initial phase of the interference cosine signal. In the FMCW interference signal based on the sawtooth wave, part of the waveform has irregularities, so in the digital phase detection process, the regular part of the signal waveform is taken for processing. In the experiment, the number of sampling points for each modulation cycle is 3000, and the signal corresponding to 500-2500 points is taken as the useful signal. Each step of the phase detection algorithm is explained in detail as follows.
(1) Amplitude correction is the normalization of the digital cosine signal amplitude. It can be seen from Figure 5 that when the modulation current changes linearly, the amplitude of the interference signal also changes linearly; then the amplitudes of the obtained cosine signals will be inconsistent. In order to improve the phase discrimination accuracy of the cosine signal, the amplitude normalization correction of the signal needs to be performed first. e amplitude correction is the normalization of the digital cosine signal amplitude. e modulation current is controlled by the DA in the ARMprocessor (STM32F407). e sampling point of the obtained cosine signal divided by the corresponding DA setting value is the adjustment value of the output cosine amplitude. In view of the threshold current of the DFB laser, the DA set value needs to be subtracted from the threshold current value during the correction. (2) Digital signal software filtering: Due to multiple interference and operational amplification during signal wave transmission, the final collected signal has noises. In order to accurately find the extreme value, the digital cosine signal needs to be filtered by software to remove interference. Common filtering methods include finite amplitude filtering, median filtering, and mean filtering. In view of the advantages of moving average filtering, that is, not only can the phase of the cosine signal remain unchanged, but also the algorithm is simple. e subject uses moving average filtering to denoise the FMCW interference signal. Figure 6 shows the effect after filtering the interference cosine signal. Compared with Figure 5, it can be seen that the glitch on the signal curve is clearly reduced, the curve is smooth, and the filtering effect is significant. the minimum value. On the contrary, if the monotonicity is determined to be increasing in the first time and the value is decreasing in the second time, the maximum value of the 20 points is the maximum value. All the extreme points of the interference signal can be found if the whole interference cosine signal is traversed as described above. Figure 7 shows the maximum and minimum values obtained by the extreme value finding algorithm.
Due to the limitation of the excitation characteristics of the DFB laser, the interference signal has irregularities at both ends of the modulation period. When looking for the extreme value, it is necessary to find the extreme value from the regular cosine signal for the whole period. As can be seen from Figure 7, the algorithm can accurately find the five maximum and minimum values in the cosine signal in a modulation period.  As shown in Figure 8, the green point is the determined zero point of the cosine signal. e period and phase of the cosine signal can be determined according to the zerocoordinate value and the trigonometric function. By comparing the phase with the phase of the zero points obtained in the previous modulation period, the amount of change in the zero phases of the two modulation periods can be calculated. e phase and phase change of each cycle are calculated in the same way, and the phase change of the entire displacement process can be obtained by accumulating the phase change. Finally, using formula (7) in the second section, the change of displacement can be calculated.

Mechanical Structure Design of Contactlarge-Range Displacement Sensor.
With the continuous development of the manufacturing industry, displacement sensors play an increasingly important role in aerospace, ultraprecision machining, and measurement fields. ey are mainly used in the measurement of the size and surface morphology of parts in precision machining, displacement measurement of precision motion, and so on. e contact sensor can accurately realize the micron level surface profile of the object through contact or noncontact measurement, so it is widely used in the field of equipment manufacturing. e feature size of precision machining technology and biotechnology continues to reduce gradually into submicron or even nanometer-level accuracy, which puts forward higher requirements for displacement sensors. However, there is a certain measurement error in the measurement principle of inductive sensors, and it is difficult to ensure high accuracy and consistency in the winding and parts processing technology.
e measurement value needs to be transferred through comparison, so it cannot solve the common problems of small range, low accuracy, large drift, poor stability, and so on. Taking Mahr's (Germany) axial inductance sensor P2010M as an example, as shown in Figure 9, the maximum measurement range is 10 mm (−5 mm to +5 mm), and the linear deviation is 20 μm. erefore, it is difficult to meet the requirements of large-size and highprecision parts detection.
Referring to the characteristics of simple structure and easy installation of contact inductance sensor, the research group innovatively developed a large range and high-precision contact displacement sensor based on FMCW laser continuous-wave frequency modulation technology. e sensor is compact, flexible, and easy to install. e laser interferometry with the cooperative target is embedded in the sensor cavity to replace the noncooperative target technology, which reduces the difficulty and cost of the optical system. By converting noncontact measurement to contact measurement, the direct detection of the part surface profile is realized, the application of laser interferometry with the cooperative target is expanded, and the problem of large-scale and high-precision measurement in the industrial field is effectively solved. e structure of the contact laser interference displacement sensor is shown in Figure 10. e measuring rod moves through the sliding pair in the axle sleeve. Under the guarantee of precision assembly, the radial clearance of the measuring rod is less than 1 μm. e reflector is placed at the front end of the measuring rod. e laser collimator is fixedly mounted at the tail of the sensor. e laser beam forms a measuring interference cavity through the hollow measuring rod and the reflector. As the upper and lower limits are adjusted, the measuring range of the sensor can be adjusted. e sensor probe is rigidly connected with the measuring rod, and it will be changed with the contour of the measured part, causing the reflector to move with the measuring rod and forming a varying interference cavity. e laser interference signal is sent to the measurement processing circuit through the optical tail fiber and is sampled and calculated by the ARM processor, so that accurate displacement measurement can be realized. Figure 11, the contact laser interference displacement sensor is mounted on a precision reference benchmark platform. Based on the lower machine of the STM32F407 microprocessor, the FMCW is transmitted to the displacement sensor through the optical fiber and the beat signal is received and converted to a digital signal. e initial phase of the interference cosine signal is calculated after the digital signal is subjected to amplitude correction, amplification, and filtering, searching for extreme values and zero positioning in order, and then the displacement variation can be obtained by formula (6). e host computer collects, displays, and saves the measurement data in real time through the serial port. e software based on VC can also display the measurement curve in real time.

Experiment. As shown in
In the experiment, a precision benchmark platform stroke (BCT-5C) and a grade 0-gauge block were used to linearly verify the measurement range of the sensor. As shown in Figure 6, the upper computer samples and fits the curve, and Figure 6(b) shows that the linear range of the sensor is <15 mm. In order to verify the uncertainty and stability of the displacement sensor, in a constant temperature and humidity experiment environment, the displacement sensor was placed at a position of 12 mm through a 0-level gauge block. In order to facilitate the analysis, the sensor display value is set to zero, and continuous sampling is performed at the same time. Figure 12(a) is a scatter plot of 6 International Journal of Optics  International Journal of Optics the corresponding location samples, and Figure 12(b) is the corresponding normal curve distribution. By calculation, the standard deviation of the normal distribution curve is 8.9 nm.

Conclusion
Based on the principle of FMCW, this paper deduces the calculation formula of FMCW, designs the optical system and data acquisition circuit, proposes an FMCW technology with a zero-crossing phase detection algorithm, and successfully applies it to contact laser interference displacement sensor. e results show that the performance of this laser interferometric displacement sensor is one order of magnitude better than that of the current inductive displacement sensor, which fulfills the high-precision inspection requirements of large-size components in the equipment manufacturing field.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.  International Journal of Optics