+ All Categories
Home > Documents > Assiut University|Assiut|Egypt|Homepage · 2018. 4. 21. · 32nd NATIONAL RADIO SCIENCE CONFERENCE...

Assiut University|Assiut|Egypt|Homepage · 2018. 4. 21. · 32nd NATIONAL RADIO SCIENCE CONFERENCE...

Date post: 08-Sep-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
8
32n d NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015, October University for Modern Sciences and Arts, Egypt D4. Implementation of Optical Distance Measurement Using Correlation-Based and Time Stretching Technique on Digital Signal Controller Mohamed Ate/ (lJ , Senior Member IEEE; Ehab A. Hamed (2J ; Abdu-Allah Mahjouz Electrical Engineering Department, Faculty of Engineering, Assiut University, Assiut, Egypt, moh [email protected] , ehab [email protected]g (2J ABSTRACT Through this paper we aim to measure a distance using an optical signal. The distance measurement is based on the time of the flight (TOF) method via correlation technique. A method of stretching the time scale is used to decrease the operating equency. A proof of concept using Matlab results in a distance resolution less than 17mm. The algorithm is implemented on a standalone cheap digital signal controller and the measured results show high accuracy comparable to the simulated one. The optical transmitters and optical receivers are implemented using off shelf components. Keywords: Distance measurement, TOF, DSC Based System, Phase Correlation. I. INTRODUCTION The growing market of car parking sensors, digital cameras, 3D cameras, and the automotive market effort to have a truly self-driving car by 2020 raise the demands to develop a new 3D vision system [1]. The new 3D vision system based on distance measurements should detect fast optical signal using low equency components to reduce the system cost. Optical 3D measurement systems is divided into triangulation based systems and TOF systems [2]. A triangulation based system determines the distance of a particular point of a 3D scene by illuminating this point using mechanical scanning of the projected light beam. Mechanical scanning has to be avoided for many applications due to cost limitations and robustness of the overall system. There are two approaches used for TOF distance measurements. The first is pulsed runtime system operated with small duty cycle with high transmitted optical power. The runtime between the sent and received optical pulse is proportional to the travelled distance [2]. Pulsed runtime needs a high optical power lasers and high equency electronics both will raise the system cost. . . . . . . .. ................. t·onCe· ese me S y ste ····· 0 0 0 0 •••••••••• \ . · r Optical r Control Unit " · · Transmitter IIDSC" laser laser Transmitted Signal CLK Driver x1(t) 150 GPIO& MHz / Optical Receiver e-PWM r Hardware Process Modulating ADC Signal x2(t) Reset Signal \ · Multiplier Photo 1 1ntegrator 1 Diode I l(t+ TOF) * X2 . . . . " . . . . Fig. l: Runtime-based Optical Distance Measurement System. ISBN 978-1-4799-7723-9/15/$31.00©2015 IEEE 347 . . . . . . . . '
Transcript
Page 1: Assiut University|Assiut|Egypt|Homepage · 2018. 4. 21. · 32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015, October University for Modern Sciences and Arts,

32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015,

October University for Modern Sciences and Arts, Egypt

D4. Implementation of Optical Distance Measurement Using Correlation-Based and

Time Stretching Technique on Digital Signal Controller

Mohamed Ate/(lJ, Senior Member IEEE; Ehab A. Hamed(2J; Abdu-Allah Mahjouz

Electrical Engineering Department, Faculty of Engineering, Assiut University, Assiut, Egypt,

moh [email protected](1), ehab [email protected](2J

ABSTRACT

Through this paper we aim to measure a distance using an optical signal. The distance measurement is based on the time of the flight (TOF) method via correlation technique. A method of stretching the time scale is used to decrease the operating frequency. A proof of concept using Matlab results in a distance resolution less than 17mm. The algorithm is implemented on a standalone cheap digital signal controller and the measured results show high accuracy comparable to the simulated one. The optical transmitters and optical receivers are implemented using off shelf components.

Keywords: Distance measurement, TOF, DSC Based System, Phase Correlation.

I. INTRODUCTION

The growing market of car parking sensors, digital cameras, 3D cameras, and the automotive market effort to have a truly self-driving car by 2020 raise the demands to develop a new 3D vision system [1]. The new 3D vision system based on distance measurements should detect fast optical signal using low frequency components to reduce the system cost. Optical 3D measurement systems is divided into triangulation based systems and TOF systems [2]. A triangulation based system determines the distance of a particular point of a 3D scene by illuminating this point using mechanical scanning of the projected light beam. Mechanical scanning has

to be avoided for many applications due to cost limitations and robustness of the overall system. There are two approaches used for TOF distance measurements. The first is pulsed runtime system operated with small duty cycle with high transmitted optical power. The runtime between the sent and received optical pulse is proportional to the travelled distance [2]. Pulsed runtime needs a high optical power lasers and high frequency electronics both will raise the system cost.

......................... iYfst·iJonCe· iVieiis·lire me·iii Syste m······ 0 0 0 0 ••••••••••••••••

� \ . · r Optical "'" r Control Unit " · ·

Transmitter IIDSC"

laser laser Transmitted Signal CLK � Driver x1(t) 150

"- ../ GPIO& MHz

/ Optical Receiver "' e-PWM r Hardware Process Modulating

ADC Signal x2(t)

Reset Signal \... · Multiplier

�� Photo

� 11ntegrator 1 � Diode

"-I

�lAl(t+ TOF) * X2.�) . . . . " . 'Y ............................................................................................................................................................................... ..

Fig. l: Runtime-based Optical Distance Measurement System.

ISBN 978-1-4799-7723-9/15/$31.00©2015 IEEE 347

. ..

.

. . ..'

Page 2: Assiut University|Assiut|Egypt|Homepage · 2018. 4. 21. · 32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015, October University for Modern Sciences and Arts,

32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015,

October University for Modern Sciences and Arts, Egypt

The second TOF method is based on phase correlation using a continuous wave direct modulated light source to illuminate the object. The receiver correlates the electrical modulating signal and the optical received modulated signal. The phase-shift between these two signals is proportional to the measured distance [2, 3].

The TOF system consists of an optical transmitter, optical receiver and a control unit as shown in Fig. 1. The TOF elapses during the propagation of the light to the object and back again, which is easily calculated by (TOF =2d/c) where c is the speed of light and d is the travelled distance [4]. Authors in [5] have presented an FPGA based characterization system for 3D TOF distance measurement. The system in [5] is capable of generating all control signals required for a typical TOF measurement.

In this paper we introduce a hardware correlation and time stretching on the signals to reduce the processed signal bandwidth. A cheap distance measurement system is implemented based on low cost microcontroller able to receive a stretched low frequency signal using a built-in ADC.

v. HARDWARE CORRELATION, TIME SCALING AND DISTANCE EXTRACTION USING FFT Transmitted optical signal is a continuous-wave signal because of disadvantages of using pluses as it needs a

high optical power, see Fig.2 a. In our work we use correlation of the continuous-wave reflected and modulating

signals to calculate the phase, see Fig.2 b. The optical transmitter will emit an optical square wave x1(t) . The

transmitted optical signal will travel to the object and reflect back xl (t + TOF), see Fig.1 a. The optical receiver

will receive the reflected signal xl (t + TOiF) and then do a cross correlation between the reflected signal and the

modulating signal x2(t) using time stretching technique to reduce the working frequency of the system, see Fig.2 b. The optical transmitter and optical receiver are implemented using off shel f components.

TrlIn

The following operations are performed to extract the travelled distance using the proposed system in Fig.l:

1. Multiply a number of periods M of the reflected signal xl (t + TOF) with M periods of the

modulating signal x2W. 2. Integrate the multiplied signals over M periods to stretch the time of the output signal by factor M. 3. Read the final value of the integrated M periods signal by the ADC of the microcontroller. 4. Reset the value of the integrator to zero after reading its value using reset signal.

5. Shift the modulating signal x2{t) by a correlation shift to be x2(t + Too rr) .

(a)

06

Time

(b)

08

Fig. 2: (a) The Transmitted, Modulating, and the Reset signals. (b) Stretched Correlation Function using M=64 periods, N=16, with 9.375 MHz clock.

110�

6. Repeat steps 1 to 5 with the new time shifted modulating signal, after each repetition increase the shift of the modulating signal by another correlation shift, do this for N times to get N samples as shown in Fig. 2 b.

348

Page 3: Assiut University|Assiut|Egypt|Homepage · 2018. 4. 21. · 32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015, October University for Modern Sciences and Arts,

32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015,

October University for Modern Sciences and Arts, Egypt

7. Generate the FFT of these N samples and extract the phase of the fundamental.

By applying FFT to the N samples triangular like curve (Fig.2.b), we can extract the fundamental of this curve

( k = 1). The phase of this fundamental is also extracted from this FFT results. It is worth to note that FFT

algorithm is applied the samples using normalized sampling rate i.e., Ts = 1. So the phase measured from FFT must be renormalized to adequate the actual sampling rate. Returning to Fig. 2 (b), we can deduce the sampling rate to be:

x (n) ��X (k) After a normalized delay time Nd = ...:.:. :

N oS

X [(en - Nd))N] �-#'x O,) .g -i'l;;7k 9!

(1)

(2)

(3)

Where N is number of the calculated FFT points and td is the measured delay from correlation curve Fig.2 b.

Due to time scaling property the time of the flight is then equal to:

t:r - ...!4... . Oli' - NM

From equation (3) the phase of the delayed signal is:

The phase of the fundamental (K = I) is:

(" _, Nd ip kr = - 2rl: ­N

, _ N�(1) d-After renormalizing Nd value it becomes:

(4)

(5)

(6)

t = N�(1) T = �(1) M T d . s � m It is clear from relation (7) that the measured delay td from the correlation curve (Fig.2 b) is MN times TmO!! ; this allows using a lower speed ADCs to read this correlation curve and then perform the FFT and extracting the phase. Substitute from equation (4) in (7) the time of the flight can be calculated by: (8)

<p(1) �o� =

2n T�

And the required measured distance will be:

VI. SIMULA TION RESULTS

c hlo!' d= --2

(9)

Figure 3 depicts simulation results of the proposed method using FFT algorithm. The error distance curves as a function of the real distance at different SNRs are illustrated in Fig.3. The noise applied is zero mean pseudo random Gaussian noise. We can clearly note the robustness of FFT method, the error due to non-linearity doesn't exceed 20mm. Even after adding noise the error distance doesn't exceed 50mm.

349

Page 4: Assiut University|Assiut|Egypt|Homepage · 2018. 4. 21. · 32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015, October University for Modern Sciences and Arts,

32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015,

October University for Modern Sciences and Arts, Egypt

FFT Non-linearity makes some error in the measured distance that comes from samples asymmetry. The error decreases with increasing the number of samples (N). For example if N=4 the distance error =21cm, N=8 the distance error =4cm, N=16 the distance error =2cm and N=32 the distance error =lcm, as M=64 for all mentioned distance errors. Increasing M will stretch the output signal time more and a slower (cheaper) ADC can be used. Also increasing M will reduce the noise as the summation time (averaging) will increase. On the other hand, M is limited by the calculation time, i.e., higher M leads to more calculations (slower response) and this can affect the accuracy at small distances. FigA shows the relationship between M variations with maximum error distance at different number of samples eN).

Without Noise

E 10 u .: 6 .... QI •• ,,""""""" � 0 �""" ."""","" '''''''''''''''''''''''' IV t :0 -5 .. o t .10'-----.1.-------------1 W 0 5 10 15

Real distance (In meters)

(a)

O SNR:: 12.24 �1 �----�------�------� E u oS 5 QI ' , ,." , • • ' .. ,. .,' , • II • U 0 •• ', • , ' •• , '''''. ' II • .' ' •• " � . ' . .' ..

... . ..

15 -6 .. o .. .. w · l0'--____ I.-I ___ --'-___ --"

o 5 10 15 Real distance lin meters)

(e)

SNR:: 9.56 �10�------�------r_----� E u c: 5

.. ' '. . . � 0 ,. , " '

. • " " . , " , '. ' " • c: " " • , .,' ',,'''. ,.'",. •

• •• • • • • ,

� .

:0 .s .. o t .10'-------------'------J W 0 5 10 �

Real distance lin meters)

(b)

SNR:: 19.98 10�---....---------.

E u c: 5 .­.... QI " ..... , .... .

. ,', . ... � 0 h"

• ., ..............................

.... . IV � :0 -6 .. o .. .. w·l0"'-------0001...-------....... -------J

o 5 W 15 Real distance lin meters)

(d)

Fig. 3: Error versus Real Distance at Different SNR. (a) without noise (b) SNR=9.56 (c) SNR=12.24 (d) SNR=19.98

350

Page 5: Assiut University|Assiut|Egypt|Homepage · 2018. 4. 21. · 32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015, October University for Modern Sciences and Arts,

32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015,

October University for Modern Sciences and Arts, Egypt

max error distance versus M variation without noise

45

40 !!? <II Q)35 E ''':; c: �30

,5 e 25 c: (\I 1i) 'S20 g <II 15 )C (\I :::!

10

5

+ N=4 o N=8 • N=16

10 20 3J 40 50 60 70 80 90 100 110 M number of transmitted periods

Fig. 4: Effect of changing M and N in the max error.

VII. CONTROL UNIT

A TMS320F28335 Digital Signal Controller (DSC) from Texas Instruments included in Delfino™ experiment kit (TMDSDOCK28335) is used as a control unit [6]. The main features in this control unit which fulfilled the requirements to run the proposed distance measurement algorithm are:

l. Real Time processing. 2. Can produce square wave signal up to lOMHz. 3. Have 12.5Mb/s 12bit ADC. 4. Can control the output signals duty cycles accurately.

A. SIGNALS GENERATED BY THE DSC

By the DSC we can generate the three signals (Fig.2a). The first signal is the transmitted square wave (original

signal) xl (t), with frequency 9.375 MHz , used to modulate the laser driver. The second one is, shifted signal x2(t) which is the same as transmitted signal with time shift every M periods. Fig.6 shows the practically generated

transmitted and modulating signals using the DSC and measured by Agilent Digital Oscilloscope. x2(t) is hardware

multiplied by the received optical signal. The third signal is the reset signal which generates a pulse every M period to reset the integration circuitry and discharges its integration capacitor to zero every M periods.

The samples result from the hardware cross correlation, (illustrated in Fig.2 b), will be read by the built-in ADC of the DSC. The FFT for the correlation signals and phase extraction are performed inside the DSC and the distance is calculated and displayed as illustrated in Fig.7.

In this work we used N= 16, M=256, the correlation shift every M periods is one clock cycle of the DSC, since this DSC's clock is 150MHz, then Tcorr= 11150MHz = 6.66667 ns. By this shift the modulating signal will coincide with the transmitted signal 9.375MHz after N=16 shifts.

351

Page 6: Assiut University|Assiut|Egypt|Homepage · 2018. 4. 21. · 32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015, October University for Modern Sciences and Arts,

32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015,

October University for Modern Sciences and Arts, Egypt

1--

nee from h re Sh ft d by 1/(150+10"6) c

/

• �. �oJ I:IBII l�,o. 0"': ' . .. ....

In'lhllSC """

',I

. 1

.,

Fig. 6: Practically generated transmitted and modulating signals using the DSC measured by Agilent Digital Oscilloscope

B. DSC's MODULES AND THE PROCESS FLOW

DSC has a lot of modules; each module can be controlled by its registers to do the required action, (see Fig. 7). First we have to configure the clock module to our requirements. The clock module adjusts the clock of reading instructions and the speed of the other modules. In some parts of the code we need an interrupt coming from the timer module; so we have to configure this timer module before starting. To generate the three signals (X I, X2, Reset) we used GPIO module to configure some DSC's PINs to work in e-PWM mode. The e-PWM module controls the signals shape and duty cycle to produce the required shift in the modulating signal and generates the reset signal every M periods. Finally we configure the ADC module to read the received sample at the end of every M periods (before reset).

After configuration of the DSC modules and getting the N sample by the ADC, we do some software process, shown in Fig. 7. First we calculate the FFT of the N samples, then get the phase from FFT at k = 1. equation. (8) is used to calculate the TOF. Finally use eq. (9) to calculate the distance.

The system should be calibrated in the first time; all pervious steps are performed to measure the phase which is related to zero distance (zero TOF). This zero distance phase called "calibrating phase", coming from the delay added by the system (hardware and software process). The zero distance-phase is subtracted from the actual measured phase to get the calibrated phase that is related to the measured TOF.

Finally, by comparing the Matlab simulation results and the DSC measured results, we can calculate the error shown in Table I. The error in the measurements is equal to the difference between the real distance and the measured distance, and these errors don't exceed the < 17mm. This difference between Matlab and DSC results is due to quantization errors in the ADC of the DSC. This difference is very small because of the high accuracy 12Bit ADC.

352

Page 7: Assiut University|Assiut|Egypt|Homepage · 2018. 4. 21. · 32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015, October University for Modern Sciences and Arts,

32"d NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015,

October University for Modern Sciences and Arts, Egypt

Configuring Modules Software Process

rrr

Fig. 7: The main modules Configured in the DSC and the process flow to get the distance.

. rJF

Table I' Comparing the Results of the Measured DSC Control Unit and MATLAB Simulation

Matlab (Simulation) DSC (Measurements)

Real Distance (m) Phase (rad) Error in Distance (mm) Phase (rad) Error in Distance (mm)

0.25 -0.09723 3.173 -0.09691 3.214

0.50 -0.19564 2.573 -0.19531 2.635

1.00 -0.39011 6.275 -0.39017 6.434

2.50 -0.97821 16.286 -0.97540 16.158

4.00 -1.56750 15.820 -1.56453 15.965

5.50 -2.15679 11.488 -2.15529 11.603

7.25 -2.84625 1.311 -2.84652 l.399

8.50 -3.34125 -8.589 -3.34127 -8.471

10.25 -4.03071 -3.021 -4.02630 -2.880

12.25 -4.81446 -2.505 -4.81156 -2.540

14.25 -5.59821 2.364 -5.59501 2.420

15.50 -6.06964 -0.346 -6.08700 -0.420

VIII. CONCLUSION

Distance measurement based on the time of the flight (TOF) method via correlation technique is introduced. A method of stretching the distance information over a longer time scale is used to decrease the operating frequency. A proof of concept using Matlab results in a distance resolution in the range of millimetres. The algorithm is implemented on a cheap digital signal controller and the measured results show high accuracy comparable to the simulated one.

353

Page 8: Assiut University|Assiut|Egypt|Homepage · 2018. 4. 21. · 32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015, October University for Modern Sciences and Arts,

REFERENCES

32nd NATIONAL RADIO SCIENCE CONFERENCE (NRSC 2015), March 24-26, 2015,

October University for Modern Sciences and Arts, Egypt

[1] J. Kim, H. Shin, Algorithm & SoC Design for Automotive Vision Systems: For Smart Safe Driving, Springer, 2014. [2] M. Christian Amann, T. Bosch, R. Myllyla, and M. Rioux, Laser ranging: a critical review of usual techniques for distance measurement , Opt. Eng. Vol. 40, No. 1, pp. 10-19 , Jan , 200l. [3] A. Bhatti, Stereo Vision, I-Tech, Vienna, Austria, November 2008. [4] K.E. Peiponen, R. MyllyHi, A. V. Priezzhev, Optical Measurement Techniques: Innovations for Industry and the Life Sciences, Springer, 2009. [5] J. Seiter, M. Hofbauer, M. Davidovic, H.Zimmermann, FPGA based time-of-flight 3D camera characterization system, IEEE 16th International Symposium on Design and Diagnostics of E[ectronic Circuits & Systems (DDECS 2013), pp.240-245, 20[3. [6] http://www.ti.com/toolitmdsdock28335

354


Recommended