




技术领域technical field
本发明涉及一种检测装置,尤其涉及一种距离检测装置及其距离检测方法。The invention relates to a detection device, in particular to a distance detection device and a distance detection method thereof.
背景技术Background technique
一般来说,在三维空间中求取座标位置需要许多的麦克风搭配,例如当只有一个喇叭作为信号源时,需要大于四个以上的麦克风,才能通过每一个麦克风与喇叭的距离以及麦克风彼此之间的距离,来计算出特定麦克风的三维位置。Generally speaking, obtaining the coordinate position in three-dimensional space requires a lot of microphone collocations. For example, when there is only one speaker as the signal source, more than four microphones are required to pass the distance between each microphone and the speaker and the distance between the microphones. to calculate the three-dimensional position of a specific microphone.
发明内容Contents of the invention
本发明提供一种距离检测装置及其距离检测方法,可减少距离测量所需的声音接收器数量。The invention provides a distance detection device and a distance detection method thereof, which can reduce the number of sound receivers required for distance measurement.
本发明的距离检测装置包括扬声器、声音接收器以及处理器。扬声器配置于反射板的一侧,输出预设声音信号,反射板反射预设声音信号而产生反射声音信号。处理器将声音接收器所接收到的声音信号与预设声音信号进行交叉相关运算,以产生交叉相关信号,其中交叉相关信号包括对应预设声音信号的第一峰值以及对应反射声音信号的第二峰值,处理器依据扬声器输出预设声音信号的时间点、对应第一峰值的第一声音接收时间以及对应第二峰值的第二声音接收时间计算第一距离以及第二距离,并依据第一距离以及第二距离计算声音接收器与反射板间的距离。The distance detecting device of the present invention includes a loudspeaker, a sound receiver and a processor. The loudspeaker is arranged on one side of the reflective plate and outputs preset sound signals, and the reflective plate reflects the preset sound signals to generate reflected sound signals. The processor performs a cross-correlation operation on the sound signal received by the sound receiver and the preset sound signal to generate a cross-correlation signal, wherein the cross-correlation signal includes a first peak corresponding to the preset sound signal and a second peak corresponding to the reflected sound signal. Peak, the processor calculates the first distance and the second distance according to the time point when the speaker outputs the preset sound signal, the first sound receiving time corresponding to the first peak, and the second sound receiving time corresponding to the second peak, and calculates the first distance and the second distance according to the first distance And the second distance calculates the distance between the sound receiver and the reflector.
在本发明的一实施例中,上述的第一距离为声音接收器与扬声器间的距离,第二距离为声音接收器与虚拟扬声器间的距离,扬声器与虚拟扬声器相对于反射板呈对称,扬声器与虚拟扬声器间相隔第三距离,处理器依据第一距离、第二距离以及第三距离计算声音接收器在反射板的法线方向上与反射板间的距离。In an embodiment of the present invention, the above-mentioned first distance is the distance between the sound receiver and the speaker, the second distance is the distance between the sound receiver and the virtual speaker, the speaker and the virtual speaker are symmetrical with respect to the reflector, and the speaker There is a third distance between the virtual speaker and the processor to calculate the distance between the sound receiver and the reflector in the normal direction of the reflector according to the first distance, the second distance and the third distance.
在本发明的一实施例中,上述的预设声音信号具有时变的振幅与频率,预设声音信号经低通滤波后所得到的第一低通滤波信号与预设声音信号之间具有时间差值,处理器对声音接收器所接收到的声音信号进行低通滤波以产生第二低通滤波信号,处理器依据时间差值与第二低通滤波信号预估声音接收器接收到预设声音信号与反射声音信号时的时间。In an embodiment of the present invention, the above-mentioned preset sound signal has a time-varying amplitude and frequency, and there is a time gap between the first low-pass filtered signal obtained after the preset sound signal is low-pass filtered and the preset sound signal. difference, the processor performs low-pass filtering on the sound signal received by the sound receiver to generate a second low-pass filtered signal, and the processor estimates that the sound receiver receives a preset signal based on the time difference and the second low-pass filtered signal The sound signal and the time when the sound signal is reflected.
在本发明的一实施例中,上述的时间差值为扬声器输出预设声音信号的封包振幅峰值的时间与第一低通滤波信号的封包振幅峰值所对应的时间差值。In an embodiment of the present invention, the above-mentioned time difference is a time difference corresponding to the time when the loudspeaker outputs the peak packet amplitude of the preset sound signal and the peak packet amplitude of the first low-pass filtered signal.
在本发明的一实施例中,上述的低通滤波为无限脉冲响应滤波。In an embodiment of the present invention, the aforementioned low-pass filter is an infinite impulse response filter.
在本发明的一实施例中,上述的交叉相关运算为快速交叉相关运算。In an embodiment of the present invention, the above-mentioned cross-correlation operation is a fast cross-correlation operation.
本发明还提供一种距离检测装置的距离检测方法,距离检测装置包括扬声器以及声音接收器,扬声器配置于反射板的一侧,用以输出预设声音信号,反射板反射预设声音信号而产生反射声音信号,距离检测装置的距离检测方法包括下列步骤。将声音接收器所接收到的声音信号与预设声音信号进行交叉相关运算,以产生交叉相关信号,其中交叉相关信号包括对应预设声音信号的第一峰值以及对应反射声音信号的第二峰值。依据扬声器输出预设声音信号的时间点、对应第一峰值的第一声音接收时间以及对应第二峰值的第二声音接收时间计算第一距离以及第二距离。依据第一距离以及第二距离计算声音接收器与反射板间的距离。The present invention also provides a distance detection method of a distance detection device. The distance detection device includes a loudspeaker and a sound receiver. The loudspeaker is arranged on one side of the reflector to output a preset sound signal. The reflector reflects the preset sound signal to generate Reflecting the sound signal, the distance detection method of the distance detection device includes the following steps. A cross-correlation operation is performed on the sound signal received by the sound receiver and the preset sound signal to generate a cross-correlation signal, wherein the cross-correlation signal includes a first peak corresponding to the preset sound signal and a second peak corresponding to the reflected sound signal. The first distance and the second distance are calculated according to the time point when the speaker outputs the preset sound signal, the first sound receiving time corresponding to the first peak, and the second sound receiving time corresponding to the second peak. The distance between the sound receiver and the reflection plate is calculated according to the first distance and the second distance.
在本发明的一实施例中,上述的第一距离为声音接收器与扬声器间的距离,第二距离为声音接收器与虚拟扬声器间的距离,扬声器与虚拟扬声器相对于反射板呈对称,扬声器与虚拟扬声器间相隔第三距离,距离检测装置的距离检测方法包括,依据第一距离、第二距离以及第三距离计算声音接收器在反射板的法线方向上与反射板间的距离。In an embodiment of the present invention, the above-mentioned first distance is the distance between the sound receiver and the speaker, the second distance is the distance between the sound receiver and the virtual speaker, the speaker and the virtual speaker are symmetrical with respect to the reflector, and the speaker There is a third distance between the virtual loudspeaker and the distance detection method of the distance detection device includes calculating the distance between the sound receiver and the reflector in the normal direction of the reflector according to the first distance, the second distance and the third distance.
在本发明的一实施例中,上述的预设声音信号具有时变的振幅与频率,预设声音信号经低通滤波后所得到的第一低通滤波信号与预设声音信号之间具有时间差值,距离检测装置的距离检测方法包括下列步骤。对声音接收器所接收到的声音信号进行低通滤波以产生第二低通滤波信号。依据时间差值与第二低通滤波信号预估声音接收器接收到预设声音信号与反射声音信号时的时间。In an embodiment of the present invention, the above-mentioned preset sound signal has a time-varying amplitude and frequency, and there is a time gap between the first low-pass filtered signal obtained after the preset sound signal is low-pass filtered and the preset sound signal. The difference, the distance detection method of the distance detection device includes the following steps. The sound signal received by the sound receiver is low-pass filtered to generate a second low-pass filtered signal. The time when the sound receiver receives the preset sound signal and the reflected sound signal is estimated according to the time difference and the second low-pass filtered signal.
在本发明的一实施例中,上述的时间差值为扬声器输出预设声音信号的封包振幅峰值的时间与第一低通滤波信号的封包振幅峰值所对应的时间差值。In an embodiment of the present invention, the above-mentioned time difference is a time difference corresponding to the time when the loudspeaker outputs the peak packet amplitude of the preset sound signal and the peak packet amplitude of the first low-pass filtered signal.
在本发明的一实施例中,上述的低通滤波为无限脉冲响应滤波。In an embodiment of the present invention, the aforementioned low-pass filter is an infinite impulse response filter.
在本发明的一实施例中,上述的交叉相关运算为快速交叉相关运算。In an embodiment of the present invention, the above-mentioned cross-correlation operation is a fast cross-correlation operation.
基于上述,本发明的实施例将声音接收器所接收到的声音信号与预设声音信号进行交叉相关运算,以产生交叉相关信号,依据扬声器输出预设声音信号的时间点、交叉相关信号中对应第一峰值的第一声音接收时间以及对应第二峰值的第二声音接收时间计算第一距离以及第二距离,并依据第一距离以及第二距离计算声音接收器与反射板间的距离,如此可减少距离测量所需的声音接收器数量。Based on the above, the embodiment of the present invention performs a cross-correlation operation on the sound signal received by the sound receiver and the preset sound signal to generate a cross-correlation signal. According to the time point when the speaker outputs the preset sound signal, the corresponding The first sound receiving time of the first peak and the second sound receiving time corresponding to the second peak calculate the first distance and the second distance, and calculate the distance between the sound receiver and the reflector according to the first distance and the second distance, so Reduces the number of sound receivers required for distance measurement.
为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合附图作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail with reference to the accompanying drawings.
附图说明Description of drawings
图1是依照本发明一实施例的距离检测装置的示意图;1 is a schematic diagram of a distance detection device according to an embodiment of the present invention;
图2是依照本发明一实施例的交叉相关信号的波形示意图;FIG. 2 is a schematic waveform diagram of a cross-correlation signal according to an embodiment of the present invention;
图3A是依照本发明一实施例的扬声器输出的预设声音信号的波形示意图;3A is a schematic waveform diagram of a preset sound signal output by a speaker according to an embodiment of the present invention;
图3B是依照本发明一实施例的声音接收器所接收到的声音信号的波形示意图;3B is a schematic waveform diagram of a sound signal received by the sound receiver according to an embodiment of the present invention;
图4是依照本发明一实施例的距离检测装置的距离检测方法的流程图。FIG. 4 is a flowchart of a distance detection method of a distance detection device according to an embodiment of the invention.
附图标号说明:Explanation of reference numbers:
102、102’:扬声器102, 102': speaker
104:声音接收器104: Sound Receiver
106:处理器106: Processor
A1:反射板A1: reflector
d、R、R1、R2、H:距离d, R, R1, R2, H: distance
s(t):预设声音信号s(t): preset sound signal
tA、tB、t_Tx、t_Max、t_Tx_IIR、t_Rx_IIR:时间tA, tB, t_Tx, t_Max, t_Tx_IIR, t_Rx_IIR: time
t1:时间差值t1: time difference
TA、T_C、T_N:时间长度TA, T_C, T_N: length of time
Tx_IIR:第一低通滤波信号Tx_IIR: first low-pass filtered signal
Rx_IIR:第二低通滤波信号Rx_IIR: second low-pass filtered signal
y(t):声音信号y(t): sound signal
S402~S406:距离检测装置的距离检测方法步骤S402~S406: Steps of the distance detection method of the distance detection device
具体实施方式detailed description
图1是依照本发明一实施例的距离检测装置的示意图,请参照图1。距离检测装置包括扬声器102、声音接收器104以及处理器106,其中处理器106耦接声音接收器104,扬声器102与声音接收器104的相对距离R1可例如为固定,然不以此为限。扬声器102配置于反射板A1的一侧,扬声器102可输出预设声音信号,反射板A1可反射预设声音信号而产生反射声音信号,其中预设声音信号具有时变的振幅与频率,也就是说,预设声音信号在不同时间点可对应不同的振幅与频率,对应地,反射声音信号也具有时变的振幅与频率。声音接收器104用以接收声音信号,处理器106可用以对预设声音信号以及声音接收器104所接收到的声音信号进行信号处理。声音接收器104所接收到的声音信号可包括扬声器102输出的预设声音信号以及反射板A1反射预设声音信号而产生的反射声音信号,其中反射声音信号可等效于以反射板A1为中心,而与扬声器102呈对称配置的虚拟扬声器102’所输出,如图1所示,扬声器102与虚拟扬声器102’相对于反射板A1呈对称,且皆与反射板A1相距距离d。FIG. 1 is a schematic diagram of a distance detecting device according to an embodiment of the present invention, please refer to FIG. 1 . The distance detection device includes a
处理器106可例如包括中央处理器、或是其他可程序化的一般用途或特殊用途的微处理器(Microprocessor)、数码信号处理器(Digital Signal Processor,DSP)、控制器、特殊应用集成电路(Application Specific Integrated Circuit,ASIC)、可程序化逻辑装置(Programmable Logic Device,PLD)或其他类似装置或这些装置的组合。此外,处理器106中可配置有随机存取存储器(RAM)或只读存储器(ROM)等易失性存储媒体,处理器106可例如与声音接收器104整合在同一电子装置(例如可携式电子装置)中,亦或是与声音接收器104分别配置在不同的电子装置中。在部分实施例中,处理器106也可通过网络或其它方式以有线或无线的方式与扬声器102以及声音接收器104进行信号传输。The
处理器106可将声音接收器104所接收到的声音信号与扬声器所输出的预设声音信号进行交叉相关运算,以产生交叉相关信号,其中交叉相关运算可例如为快速交叉相关运算,然不以此为限。图2是依照本发明一实施例的交叉相关信号的波形示意图。如图2所示,由于声音接收器104所接收到的声音信号包括扬声器102输出的预设声音信号以及反射板A1反射预设声音信号而产生的反射声音信号,因此交叉相关信号将包括对应预设声音信号的第一峰值以及对应反射声音信号的第二峰值,其中第一峰值对应的声音接收时间tA以及第二峰值对应声音接收时间tB。处理器106可依据声音接收时间tA来计算声音接收器104与扬声器102之间的距离R1,并依据声音接收时间tB来计算声音接收器104与虚拟扬声器102’之间的距离R2。如此处理器106便可依据距离R1、距离R2以及扬声器102与虚拟扬声器102’之间的距离计算声音接收器104与反射板A1间的距离,例如计算声音接收器104与扬声器102与虚拟扬声器102’的中点间的距离R,或是计算声音接收器104在反射板A1的法线方向上与反射板A1间的距离H。由上述内容可知,本实施例的距离检测装置可仅使用一个声音接收器104获得声音接收器104与反射板A1间的距离R或距离H,相较于现有技术可使用更少的声音接收器便可达到距离测量的目的。The
详细来说,声音接收器104与扬声器102之间的距离R1以及声音接收器104与虚拟扬声器102’之间的距离R2,可分别以下列式子获得:In detail, the distance R1 between the
R1=c·(tB-tA) (1)R1=c·(tB-tA) (1)
R2=c·(tB-tA) (2)R2=c·(tB-tA) (2)
其中c为声速。此外,声音接收器104与扬声器102与虚拟扬声器102’的中点间的距离R以及声音接收器104与反射板A1间的距离H可例如分别由下列式子获得:where c is the speed of sound. In addition, the distance R between the
如此将声音接收器104所接收到的声音信号与预设声音信号进行交叉相关运算来产生交叉相关信号,依据扬声器102输出预设声音信号的时间点、交叉相关信号中对应第一峰值的声音接收时间tA以及对应第二峰值的声音接收时间tB计算距离R1以及距离R2,便可依据距离R1以及距离R2计算声音接收器104与反射板A1间的距离,而有效地减少距离测量所需的声音接收器数量。In this way, the sound signal received by the
在部分实施例中,处理器106可例如通过网络传输的方式与扬声器102进行数据传输,以得知扬声器102输出预设声音信号的时间点。其中,预设声音信号经低通滤波后(例如对预设声音信号进行无限脉冲响应滤波,然不以此为限)所得到的第一低通滤波信号与预设声音信号之间具有时间差值,处理器106可依据此时间差值预估声音接收器104接收到预设声音信号的封包振幅峰值时所对应的时间,并依据声音接收器104接收到预设声音信号的封包振幅峰值的准确时间与扬声器102输出预设声音信号的封包振幅峰值的时间计算扬声器102与声音接收器104间的距离R1。举例来说,图3A是依照本发明一实施例的扬声器输出的预设声音信号的波形示意图。在图3A中,预设声音信号s(t)的封包振幅峰值对应时间t_Tx,而预设声音信号s(t)经低通滤波后所得到的第一低通滤波信号Tx_IIR(如虚线所示)的振幅峰值对应时间t_Tx_IIR,则第一低通滤波信号Tx_IIR与预设声音信号s(t)之间的时间差值t1等于t_Tx_IIR-t_Tx。In some embodiments, the
处理器106可对声音接收器104所接收到的声音信号进行低通滤波(例如进行与预设声音信号所进行的低通滤波相同的低通滤波处理)以产生第二低通滤波信号,处理器106依据时间差值与第二低通滤波信号预估声音接收器104接收到预设声音信号的封包振幅峰值时所对应的第二时间。举例来说,图3B是依照本发明一实施例的声音接收器所接收到的声音信号的波形示意图。在图3B中,声音接收器104所接收到的声音信号y(t)经低通滤波后所得到的第二低通滤波信号Rx_IIR(如虚线所示)的振幅峰值对应时间t_Rx_IIR,处理器106可将时间t_Rx_IIR减去时间差值t1,以预估声音接收器104接收到预设声音信号的封包振幅峰值时所对应的时间t_Max。The
处理器106可判断对应时间t_Max的声音接收器104接收到的声音信号y(t)的频率值与对应时间t_Tx的扬声器102输出的预设声音信号s(t)的频率值间的差值是否超出预设范围。详细来说,处理器106可对以时间t_Max为基准(例如以时间t_Max为中心,然不以此为限)的时间长度T_C内的声音接收器104所接收到的声音信号y(t)进行傅立叶转换运算,并判断在以时间t_Tx为基准(例如以时间t_Tx为中心,然不以此为限)的时间长度T_C内声音接收器104所接收到的声音信号y(t)在频域中具有最大振幅的频域信号的频率值与对应时间t_Tx的扬声器102输出的预设声音信号s(t)的频率值间的差值是否超出预设范围。当对应时间t_Max的声音接收器104接收到的声音信号y(t)的频率值与对应时间t_Tx的扬声器102输出的预设声音信号s(t)的频率值间的差值未超出预设范围时,代表声音接收器104已接收到预设声音信号s(t)。其中时间长度T_C可例如设定为对应预设声音信号s(t)的封包振幅小于预设值的时间长度,也就是说仅利用预设声音信号s(t)中封包振幅较大的部分来进行频率值的比较,以提高比较结果的精确度,此外亦可减少处理器106的运算量。The
处理器106可在对应时间t_Max的声音接收器104接收到的声音信号y(t)的频率值与对应时间t_Tx的扬声器102输出的预设声音信号s(t)的频率值间的差值未超出预设范围时,将以时间t_Tx为基准的时间长度T_C内的扬声器102输出的预设声音信号s(t)与以时间t_Max为基准的时间长度T_N内的声音接收器104所接收到的声音信号进行交叉相关运算,以产生交叉相关信号,其中交叉相关运算可例如为快速交叉相关运算,然不以此为限,此外时间长度T_N大于时间长度T_C,时间长度T_N可例如设定为大于等于预设声音信号s(t)的时间长度TA,但须小于预设声音信号s(t)传递扬声器102与声音接收器104在使用空间中能够配置的最远的相对距离所需的时间。处理器106可依据交叉相关信号的振幅峰值所对应的时间t_Rx(亦即声音接收器104接收到预设声音信号s(t)的封包振幅峰值的准确时间,其可作为图1实施例的时间tA)与时间t_Tx计算扬声器102与声音接收器104间的距离R1。举例来说,扬声器102与声音接收器104间的距离R1可等于(t_Rx-t_Tx)×c,其中c为声速。The
值得注意的是,在部分实施例中,时间长度T_N亦可被设定为小于时间长度TA,例如将时间长度T_N设定为对应预设声音信号s(t)的封包振幅小于另一预设值的时间长度。如此将时间长度T_N设定为小于预设声音信号s(t)传递扬声器102与声音接收器104在使用空间中能够配置的最远的相对距离所需的时间,处理器106便不需如现有技术般对预设声音信号s(t)与声音接收器104在长时间(至少需时间长度TA加上预设声音信号s(t)传递扬声器102与声音接收器104在使用空间中能够配置的最远的相对距离所需的时间)内所接收到的声音信号y(t)进行交叉相关运算,而可大幅地减少处理器106将预设声音信号s(t)与声音信号y(t)进行交叉相关运算的时间。而且,由于处理器106已经先判断出以时间t_Tx为基准的时间长度T_C内声音接收器104所接收到的声音信号y(t)在频域中具有最大振幅的频域信号的频率值与对应时间t_Tx的扬声器102输出的预设声音信号s(t)的频率值间的差值未超出预设范围,因此亦可确保声音接收器104已接收到预设声音信号s(t),进而可精确地得到声音接收器104接收到预设声音信号s(t)的封包振幅峰值的时间t_Rx,进而计算出扬声器102与声音接收器104间的距离R1。It is worth noting that, in some embodiments, the time length T_N can also be set to be shorter than the time length TA, for example, the time length T_N is set so that the packet amplitude corresponding to the preset sound signal s(t) is smaller than another preset The duration of the value. In this way, the time length T_N is set to be less than the time required for the preset sound signal s(t) to transmit the farthest relative distance that can be configured between the
以此类推,虚拟扬声器102’与声音接收器104间的距离R2间的距离亦可以类似的方式获得,本领域具通常知识者应可通过上述实施例得知其实施方式,因此在此不再赘述。By analogy, the distance between the virtual loudspeaker 102' and the distance R2 between the
在部分实施例中,在扬声器102与声音接收器104间的相对速度不为0的情形下。处理器106也可利用都普勒效应来修正计算出的扬声器102与声音接收器104间的距离。举例来说,扬声器102可例如每隔一个时段输出一个预设声音信号,在本实施例中,预设声音信号s(t)可以下列式子表示:In some embodiments, the relative velocity between the
s(t)=A(t)·cos[2π·f(t)·t] (5)s(t)=A(t) cos[2π f(t) t] (5)
其中t为时间,A(t)为预设声音信号s(t)的振幅,而f(t)为预设声音信号s(t)的频率。每个时段的时间长度可例如设定为预设声音信号s(t)的时间长度加上预设声音信号s(t)传递扬声器102与声音接收器104在使用空间中能够配置的最远的相对距离所需的时间,如此可确保声音接受器104在每个时段中皆可接收到扬声器102所发出的预设声音信号s(t)。Where t is time, A(t) is the amplitude of the preset sound signal s(t), and f(t) is the frequency of the preset sound signal s(t). The time length of each period can be set, for example, to the time length of the preset sound signal s(t) plus the farthest distance between the
假设扬声器102在第m个时段输出预设声音信号s(t),其中m为大于1的整数,且预设声音信号s(t)在预设声音信号s(t)的封包振幅峰值对应时间t_Tx以及频率f_TMax,另外声音接收器104接收到的预设声音信号y(t)在时间t_Max对应频率f_TMax。其中频率f_RMax可例如通过处理器106对以时间t_Max为基准(例如以时间t_Max为中心,然不以此为限)的时间长度T_C内声音接收器104所接收到的声音信号y(t)进行傅立叶转换运算而求得。频率f_RMax可例如为声音信号y(t)在频域中具有最大振幅的频域信号的频率值,然不以此为限。在部分实施例中,处理器106亦可进一步依据进行傅立叶转换运算后所得到的多个频域信号进行内插运算(例如多项式内差运算,然不以此为限),以得到更精确的频率f_RMax。其中时间长度T_C可例如设定为对应预设声音信号s(t)的封包振幅小于预设值的时间长度,通过仅利用预设声音信号s(t)中封包振幅较大的部分来进行频率值的比较,可提高计算频率的精确度,同时并可减少处理器106的运算量。Assume that the
处理器106可依据前次计算出的扬声器102与声音接收器104间的相对速度利用都普勒效应修正预设声音信号s(t)的频率值,举例来说,处理器106例如以下列式子修正预设声音信号s(t)的频率f(t):The
其中f’(t)为修正后的频率,为第m个时段第k-1阶的扬声器102与声音接收器104间的初始相对速度,c为声速,k为正整数。修正后的预设声音信号x(t)可如下列式子所示:where f'(t) is the corrected frequency, is the initial relative velocity between the
扬声器102与声音接收器104间的初始相对速度(k等于1时的相对速度)可由处理器106依据频率f_RMax与频率f_TMax计算而得,例如可依据下列式子计算而得。The initial relative velocity between the
其中为第m个时段的扬声器102与声音接收器104间的初始相对速度。处理器106可将修正后的预设声音信号x(t)与声音接收器104所接收到的声音信号y(t)进行交叉相关运算,以产生交叉相关信号,其中交叉相关运算可例如为快速交叉相关运算,然不以此为限。处理器106并依据交叉相关信号的封包振幅峰值所对应的时间与预设声音信号s(t)的封包振幅峰值对应的时间t_Tx计算扬声器102与声音接收器104间的距离R1。in is the initial relative velocity between the
举例来说,第m个时段的第k阶的修正相对距离可如下列式子所示:For example, the corrected relative distance of the k-th order of the m-th time period It can be shown as the following formula:
处理器106可依据对应第m个时段的扬声器102与声音接收器104间的修正相对距离与对应第m-1个时段的扬声器102与声音接收器104间的修正相对距离计算对应第m个时段的扬声器102与声音接收器104间的相对速度。举例来说,第m个时段的第k阶的相对速度可如下列式子所示:The
其中Td为各个时段的时间长度,Rm-1为第m-1个时段所计算出的相对距离。处理器106可在得到初始相对速度后,开始依据上述式子(6)、(7)、(9)、(10)递回地计算扬声器102与声音接收器104间的相对速度,直到相对速度收敛至特定值。举例来说,处理器106可依据对应第m个时段的扬声器102与声音接收器104间的相对速度以及对应第m-1个时段的扬声器102与声音接收器104间的相对速度判断对应第m个时段的扬声器102与声音接收器104间的相对速度是否已收敛至预设范围内。例如,处理器106可依据下列式子判断相对速度是否已收敛:Where Td is the time length of each time period, and Rm-1 is the relative distance calculated in the m-1th time period.
其中THV为预设的门槛值,当的绝对值收敛至-THV与THV构成的预设范围时,代表处理器106所计算出的第m个时段的第k阶的修正相对距离的精准度已达到要求,而可将其作为第m个时段最终确定相对距离。同理,第m个时段的第k阶的相对速度也可被作为第m个时段的最终确定相对速度。此外,第m个时段的扬声器102与声音接收器104间的最终确定相对加速度am可如以下列式子所示:where THV is the preset threshold value, when When the absolute value of converges to the preset range formed by -THV and THV, it represents the corrected relative distance of the kth order of the mth period calculated by the
am=(vm-vm-1)/Td (12)am =(vm -vm-1 )/Td (12)
以此类推,第m个时段的虚拟扬声器102’与声音接收器104间的最终确定相对距离、最终确定相对速度以及最终确定相对加速度亦可以类似的方式获得,本领域具通常知识者应可通过上述实施例得知其实施方式,因此在此不再赘述。By analogy, the final relative distance between the virtual loudspeaker 102' and the
图4是依照本发明一实施例的距离检测装置的距离检测方法的流程图,请参照图3。在本实施例中,扬声器配置于反射板的一侧,且扬声器与虚拟扬声器相对于反射板呈对称,扬声器可输出预设声音信号,反射板可反射预设声音信号而产生反射声音信号。扬声器输出的预设声音信号具有时变的振幅与频率,对应地,反射声音信号也具有时变的振幅与频率。由上述实施例可知,距离检测装置的距离检测方法可至少包括下列步骤。首先,将声音接收器所接收到的声音信号与预设声音信号进行交叉相关运算,以产生交叉相关信号,其中交叉相关信号包括对应预设声音信号的第一峰值以及对应反射声音信号的第二峰值(步骤S402),交叉相关运算可例如为快速交叉相关运算,然不以此为限。接着,依据扬声器输出预设声音信号的时间点、对应第一峰值的第一声音接收时间以及对应第二峰值的第二声音接收时间计算第一距离以及第二距离(步骤S404),其中第一距离为声音接收器与扬声器间的距离,第二距离为声音接收器与虚拟扬声器间的距离,扬声器与虚拟扬声器间相隔一段第三距离。然后,依据第一距离以及第二距离计算声音接收器与反射板间的距离(步骤S406),例如可依据所述第一距离、第二距离以及第三距离计算声音接收器在反射板的法线方向上与反射板间的距离。FIG. 4 is a flowchart of a distance detection method of a distance detection device according to an embodiment of the present invention, please refer to FIG. 3 . In this embodiment, the speaker is arranged on one side of the reflector, and the speaker and the virtual speaker are symmetrical with respect to the reflector. The speaker can output a preset sound signal, and the reflector can reflect the preset sound signal to generate a reflected sound signal. The preset sound signal output by the loudspeaker has a time-varying amplitude and frequency, and correspondingly, the reflected sound signal also has a time-varying amplitude and frequency. It can be known from the above embodiments that the distance detection method of the distance detection device may at least include the following steps. Firstly, the sound signal received by the sound receiver is cross-correlated with the preset sound signal to generate a cross-correlation signal, wherein the cross-correlation signal includes a first peak corresponding to the preset sound signal and a second peak corresponding to the reflected sound signal. Peak (step S402 ), the cross-correlation operation can be, for example, a fast cross-correlation operation, but it is not limited thereto. Next, calculate the first distance and the second distance according to the time point when the speaker outputs the preset sound signal, the first sound receiving time corresponding to the first peak, and the second sound receiving time corresponding to the second peak (step S404), wherein the first The distance is the distance between the sound receiver and the speaker, the second distance is the distance between the sound receiver and the virtual speaker, and there is a third distance between the speaker and the virtual speaker. Then, calculate the distance between the sound receiver and the reflector according to the first distance and the second distance (step S406), for example, calculate the distance between the sound receiver and the reflector according to the first distance, the second distance and the third distance. The distance from the reflector in the line direction.
其中,预设声音信号经低通滤波后所得到的第一低通滤波信号与预设声音信号之间具有时间差值,其中时间差值可例如为扬声器输出预设声音信号的封包振幅峰值的时间与第一低通滤波信号的封包振幅峰值所对应的时间差值。在部分实施例中,可对声音接收器所接收到的声音信号进行低通滤波以产生第二低通滤波信号,并依据时间差值与第二低通滤波信号预估声音接收器接收到预设声音信号与反射声音信号时的时间,以依据扬声器输出预设声音信号的封包振幅峰值的时间与声音接收器接收到预设声音信号与反射声音信号时的时间来计算声音接收器与反射板间的距离。Wherein, there is a time difference between the first low-pass filtered signal obtained after the preset sound signal is low-pass filtered and the preset sound signal, wherein the time difference can be, for example, the package amplitude peak value of the speaker outputting the preset sound signal The time difference corresponding to the time and the peak value of the packet amplitude of the first low-pass filtered signal. In some embodiments, the sound signal received by the sound receiver can be low-pass filtered to generate a second low-pass filtered signal, and the sound receiver receives the predicted signal according to the time difference and the second low-pass filtered signal. The time when the sound signal and the reflected sound signal is set is calculated based on the time when the loudspeaker outputs the peak value of the packet amplitude of the preset sound signal and the time when the sound receiver receives the preset sound signal and the reflected sound signal to calculate the sound receiver and the reflector distance between.
综上所述,本发明的实施例将声音接收器所接收到的声音信号与预设声音信号进行交叉相关运算,以产生交叉相关信号,依据扬声器输出预设声音信号的时间点、交叉相关信号中对应第一峰值的第一声音接收时间以及对应第二峰值的第二声音接收时间计算第一距离以及第二距离,并依据第一距离以及第二距离计算声音接收器与反射板间的距离,如此可减少距离测量所需的声音接收器数量。In summary, the embodiments of the present invention perform cross-correlation calculations on the sound signal received by the sound receiver and the preset sound signal to generate a cross-correlation signal, and the time point at which the speaker outputs the preset sound signal and the cross-correlation signal The first sound receiving time corresponding to the first peak and the second sound receiving time corresponding to the second peak to calculate the first distance and the second distance, and calculate the distance between the sound receiver and the reflector according to the first distance and the second distance , which reduces the number of sound receivers required for distance measurements.
虽然本发明已以实施例揭示如上,然其并非用以限定本发明,任何所属技术领域中技术人员,在不脱离本发明的精神和范围内,当可作些许的更改与润饰,故本发明的保护范围当视权利要求书所界定的为准。Although the present invention has been disclosed above with the embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of protection should depend on what is defined in the claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710674498.3ACN109375199B (en) | 2017-08-09 | 2017-08-09 | Distance detection device and distance detection method thereof |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710674498.3ACN109375199B (en) | 2017-08-09 | 2017-08-09 | Distance detection device and distance detection method thereof |
| Publication Number | Publication Date |
|---|---|
| CN109375199A CN109375199A (en) | 2019-02-22 |
| CN109375199Btrue CN109375199B (en) | 2022-12-06 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710674498.3AActiveCN109375199B (en) | 2017-08-09 | 2017-08-09 | Distance detection device and distance detection method thereof |
| Country | Link |
|---|---|
| CN (1) | CN109375199B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2601497A (en)* | 2020-12-01 | 2022-06-08 | Nordic Semiconductor Asa | Radio frequency distance determination |
| CN116486823B (en)* | 2022-01-14 | 2025-09-05 | 宏碁股份有限公司 | Sound watermark processing method and sound watermark generating device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101118282A (en)* | 2006-08-04 | 2008-02-06 | Nec显示器解决方案株式会社 | Distance measuring system and method |
| CN102893175A (en)* | 2010-05-20 | 2013-01-23 | 皇家飞利浦电子股份有限公司 | Distance estimation using sound signals |
| CN103443649A (en)* | 2011-03-03 | 2013-12-11 | 高通股份有限公司 | Systems, methods, apparatus, and computer-readable media for source localization using audible sound and ultrasound |
| CN105721066A (en)* | 2014-09-30 | 2016-06-29 | 财团法人工业技术研究院 | Space state detection device, system and method based on sound waves |
| TW201638608A (en)* | 2015-04-28 | 2016-11-01 | 英特爾公司 | Measurement of distance between devices using audio signals |
| CN106595572A (en)* | 2016-10-20 | 2017-04-26 | 北京理工大学 | Method and apparatus for measuring low-altitude flight height of aircrafts |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102089634B (en)* | 2008-07-08 | 2012-11-21 | 布鲁尔及凯尔声音及振动测量公司 | Reconstructing an acoustic field |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101118282A (en)* | 2006-08-04 | 2008-02-06 | Nec显示器解决方案株式会社 | Distance measuring system and method |
| CN102893175A (en)* | 2010-05-20 | 2013-01-23 | 皇家飞利浦电子股份有限公司 | Distance estimation using sound signals |
| CN103443649A (en)* | 2011-03-03 | 2013-12-11 | 高通股份有限公司 | Systems, methods, apparatus, and computer-readable media for source localization using audible sound and ultrasound |
| CN105721066A (en)* | 2014-09-30 | 2016-06-29 | 财团法人工业技术研究院 | Space state detection device, system and method based on sound waves |
| TW201638608A (en)* | 2015-04-28 | 2016-11-01 | 英特爾公司 | Measurement of distance between devices using audio signals |
| CN106595572A (en)* | 2016-10-20 | 2017-04-26 | 北京理工大学 | Method and apparatus for measuring low-altitude flight height of aircrafts |
| Publication number | Publication date |
|---|---|
| CN109375199A (en) | 2019-02-22 |
| Publication | Publication Date | Title |
|---|---|---|
| US10839808B2 (en) | Detection of replay attack | |
| CN104041075B (en) | Audio Source Position Estimation | |
| CN107064939B (en) | Circuit for measuring acoustic distance | |
| CN109375199B (en) | Distance detection device and distance detection method thereof | |
| CN105118515A (en) | Method for detecting wind noise based on microphone array | |
| US20190033438A1 (en) | Distance detection device and distance detection method thereof | |
| CN103268766B (en) | Method and device for speech enhancement with double microphones | |
| US9288598B2 (en) | Pipe calibration method for omnidirectional microphones | |
| JP6433630B2 (en) | Noise removing device, echo canceling device, abnormal sound detecting device, and noise removing method | |
| TWI633275B (en) | Distance detection device and distance detection method thereof | |
| KR100735407B1 (en) | Distance measuring device and method using TAO | |
| CN109387170B (en) | Distance detection device and distance detection method thereof | |
| TWI646341B (en) | Distance detection device and distance detection method thereof | |
| WO2016013286A1 (en) | Phase difference calculation device, sound source direction detection device, and phase difference calculation method | |
| TWI633323B (en) | Distance detection device and distance detection method thereof | |
| CN117665707A (en) | Impulse sound arrival time difference estimation method based on time focusing | |
| CN109387829B (en) | Distance detection device and distance detection method thereof | |
| TWI633276B (en) | Distance detection device and distance detection method thereof | |
| WO2020160703A1 (en) | Audio diagnostics in a vehicle | |
| TW201915432A (en) | Distance detection device and distance detection method thereof | |
| US20240241251A1 (en) | Signal processing device, sound wave system, and vehicle | |
| CN105917244A (en) | Method for Locating Pulse Sources in Dispersive Media | |
| JP2023031336A (en) | Signal processing device, sound wave system, and vehicle | |
| CN109696668A (en) | Distance detection device and its distance detection method | |
| US20170272875A1 (en) | Pipe calibration method for omnidirectional microphones |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |