外文原文
1 Introduction
Ultrasonic distance measurement as a typical non-contact measurement method, in many occasions, such as industrial automation, measurement and robot construction and other aspects of visual recognition is widely used. And other methods, such as laser ranging, such as microwave ranging, due to velocity of sound in air is much smaller than the light and radio wave propagation speed, for the time measurement accuracy requirement is much smaller than laser range finder, microwave measurement from other systems, and thus easy to implement the circuit of ultrasonic ranging system, simple structure and low cost, and ultrasound in the communication process from the smoke, the air visibility and other factors, on various occasions have been widely used. However, in the practical application of ultrasonic distance measurement has many limitations, which have affected the accuracy of ultrasonic ranging. First, significant attenuation of ultrasound in the air, as measured from the different echo signal caused ups and downs, time of arrival of the echoes have a greater measurement error; second ultrasonic pulse echo in the receiving process is greatly broadened , the resolution of the distance, especially for short distance measurement result in greater impact. There are also other factors such as temperature, wind speed measurement would also have been affected, these factors have limited the number of ultrasonic distance measurement accuracy in the high places of the application, how to solve these problems and improve the ultrasonic test distance accuracy, with great practical significance.
2, the basic principles of ultrasonic distance measurement
The basic working principle of ultrasonic distance measurement is to measure the ultrasonic propagation time in the air, and by the propagation speed of ultrasonic propagation time to determine the distance from the obstacle, the so-called pulse - echo mode. The basic circuit diagram of the method shown in Figure 1. By the emission sensor, transmitter circuit, receiver sensor, receiver amplifier, echo signal processing circuit and the MCU control circuit composed of several parts.
Transmitter circuit is usually a working frequency of 40 kHz multi-harmonic oscillator, the oscillator may be 555 or other circuits integrated circuit multivibrator type oscillator circuit. Multivibrator controlled by the microcontroller to produce a certain number of emission pulses (typically 5 to 16), used to drive the ultrasonic emission sensor, and encourage the spread of ultrasound in the air, the event reflected the obstacles to return.
Converted by piezoelectric ultrasonic receiving sensor principle, the echo signal returned by the barrier into electrical signals, as the signal amplitude is small (a few to a dozen millivolts), so by the low noise amplifier, 40 kHz band-pass filter echo signal amplification circuit to a certain extent, and less interference component by the echo signal processing circuit switching square wave signal, sent to the SCM system, time measurement and distance display. Microcontroller based on the received pulse emission time and the time to calculate the echo time difference t, ie ultrasonic propagation time in the air by the formula (1):
Calculate the distance S, where parameter c is the propagation of ultrasonic velocity in the air, due to circumstances in different temperature ultrasonic velocity in the air quite different, and thus set a temperature sensor, real-time correction, the literature describes specific method than more, not one by one described here.
3 ultrasonic ranging circuit
As the speed of sound is much less than the light and radio waves in the air velocity, ultrasonic ranging method circuit is simple, low cost. However, ultrasonic ranging has his flaws inherent in some of the first is a great ultrasound attenuation in the air, due to the different measuring distances, resulting in fluctuations in echo signals, so that echo arrival time measurement have a greater error. Was followed by transmitting ultrasonic pulses in the air in the process of transmission and reception, the echo signal is stretched. Because ultrasonic sending and receiving sensor constituted by the piezoelectric ceramic, piezoelectric ceramic piezoelectric bi-directional conversion process, there are inertia, hysteresis and other phenomena, resulting echo signals are stretched, while the transmission of ultrasonic pulses in air itself and multiple reflection path also leads to echo signals are stretched. These factors have contributed to echo the correct time of arrival uncertainty, the measurement accuracy caused by a greater impact. Of course, the impact of temperature and wind speed, but the impact is mainly the accuracy of ultrasonic ranging echoes the arrival time of the measurement error, the correct echo arrival time detection, ultrasonic distance measurement accuracy can be improved. Here are two of the above echo a key factor in detecting the arrival time to discuss how to detect echo arrival time, and the corresponding circuit.
3.1 The time gain compensation circuit
Ultrasonic wave propagation in the air, the sound intensity will increase with the propagation distance decreases, which is said attenuation, ultrasonic attenuation caused by the factors is due to the spread of the beam itself, and as a result of reflection and scattering of sound caused strength weakened. Obviously, this type of decay does not reduce the total energy of the wave, but it deviated from the original direction of propagation and transfer to the other direction go up. The initial set of sound intensity is I0, after x distance, due to attenuation, sound intensity becomes I, the absorption of ultrasound can be used formula (2), said:
Where, α is the air attenuation coefficient.
By the above formula, the propagation of ultrasound in air, with the propagation distance increases, the total energy gradually weakened, and its law is based on exponential decay. Therefore, different distances echo pulse amplitude, because of its sound way different, resulting in the absorption of different degrees, so very different echo pulse amplitude, the pulse echo signal processing in commonly used comparator circuit, the echo pulse (the shape of bell-shaped) with a fixed reference voltage for comparison, the echo pulse shaping as a square wave; due to different distances between the echo pulse amplitude greater the uncertainty generated echo arrival time, resulting in measurement error is generated.
If the ultrasound probe is sent by the x distance to a reflective surface, and after coming back, the incident reflected sound intensity and sound intensity are Ii and Ir, from (2) yields:
It can be seen, because the gain L absorption leaving reduced sound intensity in decibels (dB) as:
Where, c is the sound velocity in air, t is the elapsed time in the communication process. Because the air attenuation coefficient α, can determine the propagation speed c, which can be proved: Ultrasonic propagation distance in the x range to reduce the number of decibels and the ultrasonic wave through the time t is proportional to the distance. That as time increases, sound intensity gain of L decreases.
Thus, the need for echo attenuation on the gain compensation. According to equation (4), can receive gain G (dB value) and the echo time t is proportional to, or gain G and the exponential increase in echo time t relationship. Compensation rate of decay and eventually the receiver the received signal remains unchanged. And therefore more distant from the echo signal reflected higher magnification, the close proximity of the reflected signal, which is an earlier arrival time of the echo signal low magnification, which called for the rate of compensation for the time gain compensation (Time Gain Compensa-tion, TGC), also known as sensitivity time compensation (STC). Figure 2.
Figure 2, (a), (b), respectively, the signal strength with distance decay curve and the echo amplitude at different distances; (c), (d), respectively, from the gain compensation curve and the corresponding waveform. Can be seen, after a time gain compensation, no different from the echo amplitude decay constant.
Time gain compensation circuit is a magnification increases exponentially at any time ask the relationship between an amplifier, the design of gain control with a digital potentiometer, and use the power of the microcontroller, the microcontroller internal compensation data is pre-set digital potentiometer attenuation state control, precise time gain compensation. Using MCU digital potentiometer circuit features a simple and compensation adjusted according to actual situation, take full advantage of the SCM software resources, in actual use and got good results.
3.2 The time to peak detection circuit
By the time gain compensation in the circuit, the echo amplitude was relatively stable. However, due to the inertia of the piezoelectric ceramic, lag and other phenomena, and the ultrasonic pulse propagation inherent in the air path of the phenomenon of multiple reflections, resulting echo signals are stretched, causing the echo to reach the correct time of uncertainty, the measurement accuracy caused by a greater impact. In addition, as the different reflectivity of various obstacles, the degree of absorption of ultrasound is also inconsistent, still found in the study will cause some echo signal amplitude fluctuations, affecting the time measurement accuracy. Echo signal processing which must take measures to eliminate the errors caused.
Echo signal processing circuit by the time the envelope detector circuit and detection circuit composed of two parts.
Envelope detection circuit does not use ordinary linear diode detector circuit, the diode forward voltage is not less than 0.5 V, 1 V below the detection of small signals, the error large. Therefore, using active full wave rectifier circuit. Diode that is placed in the op amp's feedback loop, even if the peak input voltage is less than 0.1 V, detector performance is still very accurate, as shown in Figure 3.
Circuit consists of half-wave rectifier circuit operational amplifiers A1 and A2 components inverting adder. R1 = R2 in the conditions, the input voltage U1 Ui with the relationship:
U1 Ui with the sum by the inverting summing amplifier A2, in Ui <0 时, U1 = 0, because R3 = R5, so Uout =- Ui, Uout positive.
In Ui> 0 时, U1 =- Ui, because R4 = 0.5R5, so Uout =- 2U1-Ui, so it is:
In this way, no matter how the input signal polarity of the output signal is always positive, to achieve a full-wave rectifier, filter capacitor C's role is to achieve a linear envelope detector, which is equivalent to 1 times the ultrasonic frequency increases, the increase time resolution and overcome the common existence of non-linear diode detector circuit and other shortcomings. Echo signal processing circuit is a key part of the time detection circuit. The usual scenario is to use a fixed threshold level comparator circuit, will echo through the detector signal after a fixed threshold level in a comparator circuit comparing the output of the comparator is the echo time flip arrival time, but because of echo signals are stretched and a degree of echo signal amplitude fluctuations caused by time detection errors, and thus in the design of the echo amplitude of the peak time point as the echo arrival time, which set a differential circuit and zero-crossing detection circuit.
Their works can be Figure 4 shows the peak time for the precise detection point, the method and in principle independent of signal amplitude, it has excellent characteristics of the transmission time of testing.
4 results
The experimental results at different distances shown in Table 1, each 3 times the distance test results show that in the 0.5 ~ 5 m measuring range, the system has a maximum range error is 0.5%, and the measurement repeatability is better, with higher stability.
5 Conclusion
In the ultrasonic ranging system design, how to detect ultrasonic echo pulse arrival time is the key to improve the accuracy of ultrasonic ranging. With time gain compensation circuit, with the compensation characteristics of SCM requirements under magnification the amplifier to control the echo amplitude at different distances will not decay and remain basically unchanged. Echo signal peak detection circuit used to detect the peak echo signal each time point, to avoid the echo signal is stretched as a result of time measurement error. Used two methods to improve the accuracy of ultrasonic ranging.
外文翻译
1 引 言
超声波测距作为一种典型的非接触测量方法,在很多场合,诸如工业自动控制,建筑工程测量和机器人视觉识别等方面得到广泛的应用。和其他方法相比,如激光测距、微波测距等,由于声波在空气中传播速度远远小于光线和无线电波的传播速度,对于时间测量精度的要求远小于激光测距、微波测距等系统,因而超声波测距系统电路易实现、结构简单和造价低,且超声波在传播过程中不受烟雾、空气能见度等因素的影响,在各种场合均得到广泛应用。然而超声波测距在实际应用也有很多局限性,这都影响了超声波测距的精度。一是超声波在空气中衰减极大,由于测量距离的不同,造成回波信号的起伏,使回波到达时间的测量产生较大的误差;二是超声波脉冲回波在接收过程中被极大地展宽,影响了测距的分辨率,尤其是对近距离的测量造成较大的影响。其他还有一些因素,诸如环境温度、风速等也会对测量造成一定的影响,这些因素都限制了超声波测距在一些对测量精度要求较高的场合的应用,如何解决这些问题,提高超声波测距的精度,具有较大的现实意义。
2 超声波测距基本原理
超声波测距的基本工作原理是测量超声波在空气中的传播时间,由超声波传播时间和传播速度来确定距离障碍物的距离,即所谓的脉冲——回波方式。该方式的基本电路框图如图1所示。由发射传感器、发射电路、接收传感器、接收放大电路、回波信号处理电路和单片机控制电路等几部分组成。
发射电路通常是一个工作频率为40 kHz的多谐振荡器,该振荡器可由555时基集成电路或其他电路构成多谐振荡器电路型式。多谐振荡受单片机控制,产生一定数量的发射脉冲(通常为5~16个),用于驱动超声波发射传感器,并激励出超声波在空气中传播,遇障碍物反射而返回。
超声波接收传感器通过压电转换的原理,将由障碍物返回的回波信号转换成电信号,由于该信号幅度较小(几到十几毫伏),因此须由低噪声放大、40 kHz带通滤波电路将回波信号放大到一定幅度,且干扰成分较少,并由回波信号处理电路转换成方波信号,送至单片机系统进行时间测量和距离的显示。
单片机根据脉冲发射时间和接收到回波的时间计算出时间差t,即超声波在空气中传播的时间,并由式(1):
计算出距离S,式中参数c是超声波在空气中的传播速度,由于在不同温度情况下超声波在空气中传播速度差异较大,因而设置一温度传感器进行实时修正,具体实现方法相关文献介绍较多,在这里不一一阐述。
3 超声波测距电路结构
由于声速远小于光线和无线电波在空气中的传播速度,超声波测距法电路简单、造价较低。但是超声波测距也有他固有一些缺陷,首先是超声波在空气中衰减极大,由于测量距离的不同,造成回波信号的起伏,使回波到达时间的测量产生较大的误差。其次是超声波脉冲在发射、空气中传播和接收过程中,其回波信号被展宽。由于超声波收、发传感器均由压电陶瓷构成,压电陶瓷片在压电的双向转换过程中,均存在惯性、滞后等现象,导致回波信号被展宽,另外超声波脉冲在空气中传播本身及多重的反射路经,也导致回波信号被展宽。这些因素造成了回波正确到达时间的不确定性,对测量精度造成较大的影响。当然还有温度和风速的影响,但影响超声波测距精度的主要还是回波到达时间的检测误差,正确检测回波到达时间,能使超声波测距精度获得提高。下面就以上两个影响回波到达时间检测的关键因素,讨论如何正确检测回波到达时间,并给出了相应电路设计。
3.1 时间增益补偿电路
超声波在空气中传播时,声强会随传播距离的增加而减小,这就是所说的衰减现象,造成超声波衰减的因素是由于声束本身的扩散以及以及由于反射、散射等原因造成的声强度减弱。显然,这一类衰减没有使声波的总能量减少,只是使其偏离了原来的传播方向而转移到其他方向上去了。设最初的声强为I0,在经过x距离后,由于吸收衰减,声强变为I,则超声波的吸收可以用式(2)表示:
式中,α为空气衰减系数。
由上式可知,超声波在空气中传播时,随着传播距离的增加,其总能量逐渐减弱,其规律是按指数形式衰减。因此,在不同距离上的回波脉冲幅度,由于其声程不同,造成的吸收程度也不同,使回波脉冲幅度的差异很大,由于在回波脉冲信号处理中通常采用比较器电路,将回波脉冲(形状为钟形)跟一固定的基准电压作比较,将回波脉冲整形为方波;由于不同距离的回波脉冲幅度差异较大,回波到达时间产生不确定性,导致测量误差产生。
如果探头发出的超声波,经x距离到达某反射面,并经原路返回,其入射声强和反射声强分别是Ii和Ir,由式(2)可得:
从中可以看出,因为吸收而使声强增益L减少的分贝数(dB)为:
式中,c为声波在空气中的传播速度,t为传播过程中经历的时间。由于空气衰减系数α,传播速度c均能确定,由此可以证明:超声波在x传播距离上幅度减少的分贝数与超声波穿过该距离的时间t成正比。即随着时间的增加,声强增益L逐渐减小。
因而,必须对衰减上的回波进行增益补偿。依式(4),可以把接收的增益G(dB值)与回波时间t成正比,或者增益G与回波时间t成指数增加关系。补偿衰减的幅度,最终使接收器接收的信号保持不变。因而从较远距离反射的回波信号的放大倍数较大,而距离较近的反射信号,也就是时间上较早到达的回波信号的放大倍数较小,由此进行的幅度补偿称为时间增益补偿(Time Gain Compensa-tion,TGC),也称灵敏度时间补偿(STC)。如图2所示。
图2中,(a),(b)分别表示信号强度随距离衰减曲线和不同距离的回波幅度;(c),(d)分别表示距离补偿增益曲线及相应补偿后的波形。可见,经过时间增益补偿,不同距离的回波幅度不再衰减,保持常数。
时间增益补偿电路是一种放大倍数随时问呈指数增加关系的一种放大器,设计中增益控制采用了数字电位器,并利用单片机的强大功能,将单片机内部事先设定的补偿数据对数字电位器进行衰减状态控制,可进行精确的时间增益补偿。利用单片机控制数字电位器,电路实现简单且补偿特性能根据实际情况调整,充分利用了单片机软件资源,在实际使用中收到了较好的效果。
3.2 峰值时间检测电路
在采用了时间增益补偿电路后,回波信号幅度得到了相对的稳定。但由于压电陶瓷片的惯性、滞后等现象,及超声波脉冲在空气中传播本身存在的多重反射路径等现象,导致回波信号被展宽,造成了回波正确到达时间的不确定性,对测量精度造成较大的影响。另外由于各种障碍物反射率的不同,对超声波的吸收程度也不一致,在研究中发现仍会使回波信号幅度造成一定的波动,影响了时间检测的精度。因而须在回波信号处理上采取措施,以消除所造成的误差。
回波信号处理电路由包络检波电路和时间检测电路两部分组成。
包络检波电路没有采用普通的二极管线性检波电路,由于二极管的正向导通电压不小于0.5 V,在检波1 V以下的小信号时,误差很大。因此采用有源全波整流电路。即把二极管置于运算放大器的反馈回路中,即使输入电压的峰值小于0.1 V,检波性能仍十分精确,如图3所示。
电路由半波整流电路A1和反相加法运算放大器A2组成。在R1=R2的条件下,输入电压Ui与U1的关系为:
Ui与U1由反相加法放大器A2求和,在Ui<0时,U1=0,由于R3=R5,所以Uout=-Ui,Uout为正。
在Ui>0时,U1=-Ui,由于R4=0.5R5,所以Uout=-2U1-Ui,故有:
这样,不论输入信号极性如何,输出信号总为正,实现了全波整流,电容C的作用是滤波,从而实现了线性包络检波,相当于把超声频率提高了1倍,即提高了时间分辨率,并克服了普通二极管检波电路存在着非线性等缺点。
回波信号处理电路的关键部分是时间检测电路。通常的情形是采用具有固定阀值电平的比较器电路,将经过检波后的回波信号与一固定阀值电平在一比较器电路中进行比较,比较器输出的翻转时间就是回波到达时间,但由于回波信号被展宽及回波信号幅度一定程度的波动,造成时间检测产生误差,因而在设计中把回波幅度的峰值时间点作为回波到达时间,即设置一微分电路和过零检测电路。
他们的工作原理可由图4说明,用于精确地检测峰值时间点,该方法在原理上和信号幅度无关,故具有优良的传输时间检测特性。
4 实验结果
不同距离的实验结果如表1所示,每种距离的3次测试结果表明,在0.5~5 m的测量范围内,系统最大测距误差为0.5 %,且测量重复性较好,具有较高的稳定性。
5 结 语
在超声波测距系统的设计中,如何正确检测超声波回波脉冲到达时间,是提高超声波测距精度的关键。采用时间增益补偿电路,用单片机根据补偿特性要求对放大器的放大倍数进行控制,在不同距离的回波幅度不再衰减并保持基本不变。采用回波信号峰值检测电路,检测每次回波信号的峰值时间点,避免由于回波信号被展宽而造成时间检测误差。两种方法的采用,提高了超声波测距的精度。