A distance perception method and system based on single audio signal features
By using a distance sensing method based on single audio signal features, combined with data preprocessing and deep learning networks, the problem of limited signal quantity in indoor positioning is solved, achieving high-precision, low-cost, and highly robust distance sensing, which is suitable for a variety of application scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN CANQOON TECHNOLOGY CO LTD
- Filing Date
- 2024-12-27
- Publication Date
- 2026-04-17
AI Technical Summary
In indoor positioning technology, in scenarios such as small rooms/halls and corridors, the limited number of signals and poor observation topology caused by the cost of system deployment make it difficult for existing technologies to meet the requirements of high precision and high robustness in distance sensing.
By employing a distance sensing method based on single audio signal features, including data preprocessing, normalization, and a combination of deep learning networks, a single-base station-based distance sensing system is constructed. Energy density maps and spatial attention mechanisms are used to optimize signal feature extraction and device difference compensation, and a DPNet model is built.
It achieves high-precision distance perception, reduces hardware and construction costs, improves the robustness and generalization ability of the model, adapts to different devices and environments, meets real-time requirements, and is applicable to fields such as smart homes, industrial automation, and indoor positioning.
Smart Images

Figure CN119854933B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to, but is not limited to, the field of distance sensing technology, and particularly relates to a distance sensing method and system based on a single audio signal feature. Background Technology
[0002] In indoor positioning technologies that use ranging as the observation condition, the basic positioning unit is most commonly a 4-base station. However, actual indoor spaces are not always suitable for 4-base station deployment, especially in small rooms / halls and corridors. 4-base station deployment often fails to meet cost control or ease of construction requirements, and the observation data obtained by forcibly applying this solution is prone to negative redundancy, resulting in insufficient indication of the terminal's location. For these scenarios, the industry previously favored Bluetooth Beacon (ranging or fingerprinting) technology, which offers low-cost equipment deployment. However, as this technology has been deployed and expanded, its performance has become increasingly inadequate to meet the ever-increasing accuracy standards required for intelligent scenarios. When the 4-base station audio signal group is considered as a whole, the temporal relationship between its individual signals provides a reference for both geometric and fingerprint methods to calculate the location; however, when a single signal is extracted, its spatial positioning characteristics are not fully explored.
[0003] Single-base station positioning is commonly found in radio frequency array technology, typically using multi-beam signal sources to achieve angle and distance measurement, locating the terminal within a polar coordinate framework. In the absence of spatial correlation, a single audio signal, influenced by differences in the frequency response of the device's microphone, can easily exhibit varying distance perception capabilities across different terminals.
[0004] The ratio of the direct path component to the reverberation component of an audio signal is a crucial factor in determining distance. When the environmental topology remains unchanged, the reverberation energy will remain stable and uniformly distributed within an enclosed space. In this case, the terminal's sensing distance is closely related to the energy of the direct path component.
[0005] Based on the above analysis, the urgent technical problems that need to be solved by the existing technology are: limited signal quantity and poor observation topology caused by system deployment costs in common indoor space scenarios such as small rooms / halls and corridors. Summary of the Invention
[0006] To address the problems existing in the prior art, this invention provides a distance sensing method and system based on a single audio signal feature.
[0007] This invention is implemented as follows: a distance sensing method based on a single audio signal feature, comprising the following steps:
[0008] Step 1: By preprocessing the raw data stream of the single-base station audio chirp signal, the time-domain audio signal is converted into an energy density map (EDM), and its characteristics are analyzed.
[0009] Step 2: Analyze the impact of equipment differences on EDM characteristics;
[0010] Step 3: Construct an EDM dataset based on a hybrid data source;
[0011] Step 4: Based on the feature analysis of EDM and combined with the spatial attention mechanism, construct a single-base station distance perception network (DPNet) based on deep learning methods.
[0012] Furthermore, the Chirp signal used in step 1 can be represented as:
[0013]
[0014] Where A(t) is the adjustable signal amplitude, T is the signal duration, and f0 and f e These are the signal start frequency and cutoff frequency, respectively.
[0015] Furthermore, in step 1, the audio signal is preprocessed using a Short-Term Fourier Transform (STFT) with a window length of l and an overlap rate of k to calculate the time-frequency map of the Chirp signal with a pixel size of R×C. The value of each frequency point represents the signal energy level, so this time-frequency map is called the energy density map (EDM).
[0016] Furthermore, the relationship between EDM and sensing distance in step 2 is affected by both the distance from the terminal to the base station and the differences in signal response among different terminals. The former is reflected in the different overall energy changes of the signal represented by EDM at different locations in space, while the latter is reflected in the different signal frequency response and sensitivity of different sampling devices at the same location. If the absolute logarithm of the pixel value at each frequency point in the EDM is defined as the relative energy of the audio signal at each frequency point, and the relative energy range of the EDM is defined as the response domain, then the value of this domain can intuitively reflect the two differences mentioned above.
[0017] Furthermore, in step 2, the differences between different devices are controlled to the maximum extent based on the extreme value normalization method. ±1 The level of m; normalize EDM using the following formula:
[0018]
[0019] Where i and j are the row and column indices of the EDM, respectively. The normalized energy of a frequency point ranges from [0, 1]. The stronger the signal energy, the larger the value of the corresponding pixel.
[0020] Furthermore, in step 3, a high-quality dataset containing a sufficient number of differential elements is constructed, labeled with different physical reference distances (unit: meters). Single-base station audio chirp signals are collected in two different typical indoor scenarios: a corridor and an office, and finally processed into normalized EDM data.
[0021] Furthermore, in step 4, the architecture of the single-base station distance-aware network (DPNet) adaptively senses EDM image features that can represent the spatial distance variation pattern by stacking two spatial attention modules in the form of residual attention.
[0022] DPNet adopts a "sandwich" structure of preamble, body, and suffix, with the core component being the pre-activation bottleneck residual block.
[0023] In the preamble, a 7×7 convolutional layer and a 3×3 max pooling layer are used to quickly reduce the dimension of the feature map and increase its receptive field.
[0024] The main body consists of two spatial attention modules and connected residual blocks. The number of output channels in each connected residual block is doubled to infer deeper features. In the spatial attention modules, the mask branch uses the same number of residual blocks as the trunk branch, and the number of input and output channels in all residual blocks is consistent. Since the mask branch contains more pooling layers, its receptive field is larger than that of the trunk branch, resulting in denser features during the backpropagation of the network to update gradients, inferring the weight of each pixel to the perceptual distance.
[0025] For the suffix part, an adaptive average pooling layer is used to fix the feature map size to 1×1, and then it is sent to a fully connected layer for network output.
[0026] Furthermore, in DPNet, each attention module consists of a trunk branch and a mask branch. The trunk branch processes network features and increases the receptive field, while the mask branch adds soft weights to the features, controlling the flow of weight information to various objects through bottom-up feedforward and top-down feedback. When the mask branch output, normalized by the sigmoid layer, covers the trunk branch, the dot product operation causes attenuation of global image features and may disrupt the original data identity mapping property of the trunk branch. Therefore, a secondary residual connection is made between the input and output of the attention module. This residual attention learning structure helps the network capture information at different scales and continuously improves the overall network capability as the network depth increases.
[0027] Furthermore, during the entire model training process, the input EDM is gradually decomposed into a set of pixels with increasingly smaller sizes through a feedforward structure, generating a low-resolution feature tensor with strong semantic information.
[0028] Another object of the present invention is to provide a distance sensing system based on single audio chirp signal features, which is a distance sensing method based on single audio signal features, comprising:
[0029] The data preprocessing module preprocesses the raw data stream of the single base station audio chirp signal, converting the time-domain audio signal into an energy density map (EDM) and analyzing its characteristics.
[0030] The normalization module analyzes the impact of equipment differences on EDM characteristics;
[0031] The EDM dataset building module constructs EDM datasets based on hybrid data sources;
[0032] The single-base station distance perception network construction module constructs a single-base station distance perception network (DPNet) based on deep learning methods, by combining feature analysis of EDM with spatial attention mechanism.
[0033] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows:
[0034] First, this invention proposes a distance sensing network (DPNet) based on distance sensing technology using a single audio signal.
[0035] The audio chirp signal used in this invention possesses time-frequency characteristics highly correlated with spatial distance. These characteristics are mainly reflected in the direct path to reverberation ratio (DRR). To make the DRR easier to understand and express, the audio data is first preprocessed into an energy density map (EDM) with a granularity of 1.3 ms / pixel. The specific characteristics of the EDM are analyzed from three dimensions: physical distance, occlusion, and device. An extremum normalization method is proposed to suppress device variability. Based on the numerical characteristics of the EDM, a linear distance perception model of physical distance and normalized EDM is constructed.
[0036] To optimize the distance perception performance of a single base station, a deep learning network based on a residual attention mechanism was designed. This network utilizes a spatial attention module that extracts features from the backbone branch and assigns weights to the mask branch. Leveraging the relative gradient change in the direct path energy in the EDM (Electronic Data Model), a distance perception accuracy of approximately 0.9m was achieved during training on a mixed dataset of 21,840 frames from three typical scenarios and seven devices.
[0037] Experiments on test datasets used in different scenarios and on different devices compared to the training dataset show that DPNet, with its reasonable architectural design, achieves distance-aware accuracy and stability of approximately 1m RMSE and 0.6m standard deviation, and demonstrates good generalization ability across three test devices and two test scenarios. Furthermore, as a dataset-customized classification model, DPNet outperforms the reference model RANet in terms of parameter count and computational cost.
[0038] Secondly, the expected benefits and commercial value of the technical solution of this invention after transformation are as follows: Distance sensing based on a single base station reduces the hardware, construction, and operating costs of base station equipment compared to traditional four-base station technology within a small space. Distance sensing based on audio signals differs from that based on radio frequency signals. Audio signal receivers and transmitters are widely used in various consumer and professional terminals, such as smartphones, smartwatches, walkie-talkies, and law enforcement recorders. This allows for direct application in industry sectors without changing or adding any hardware, resulting in low promotional resistance and high market acceptance.
[0039] The technical solution of this invention fills a technological gap in the industry both domestically and internationally: Indoor distance sensing mostly employs radio frequency technologies, such as Bluetooth, Ultra-Wideband (UWB), and Wi-Fi RTT, but the core patents or licenses for these technologies are held by foreign technology companies or alliances. Furthermore, audio signals are terminal-friendly; this invention adopts a different technical approach from sonar round-trip ranging, significantly increasing the system's user capacity by having the base station only broadcast signals and the terminal only receive signals.
[0040] The technical solution of this invention solves a long-standing but unsolved technical problem: single-base station distance sensing technologies are mostly limited to radio frequency signals, such as Bluetooth, Ultra-Wideband (UWB), and Wi-Fi RTT. However, radio frequency signals are electromagnetic waves with strong penetrating power, easily taking effect in areas where the signal is not intended to function, causing problems such as wall penetration or increased errors that are difficult to solve technically. Audio signals, on the other hand, are mechanical waves with weak penetrating power, making it easier to control the effective signal range within a designated area without interfering with other areas.
[0041] The technical solution of this invention overcomes the common perception that audio signals are easily interfered with by environmental noise. In reality, this invention employs a special signal modulation method, resulting in distinct signal characteristics; moreover, it targets the sub-ultrasound to ultrasound frequency band, where there is no environmental or human pollution. Furthermore, the deep learning network proposed in this invention, based on spatial attention, can effectively extract signal features from environmental noise with the assistance of prior knowledge from a large dataset.
[0042] Third, the technical problems existing in the technology
[0043] 1) Insufficient accuracy in distance perception
[0044] Existing distance sensing methods based on audio signals typically rely on complex multi-base station positioning schemes. However, this method requires synchronous cooperation among multiple devices and is significantly affected by environmental noise and multipath interference, resulting in insufficient ranging accuracy, especially in complex environments where it is difficult to meet practical needs.
[0045] 2) Interference of equipment differences on ranging results
[0046] Differences in the hardware characteristics of different audio acquisition devices (such as microphones) can introduce systematic biases, leading to inconsistencies in the output of audio signal processing and ranging models, and a lack of standardized correction mechanisms between devices.
[0047] 3) Insufficient real-time performance and robustness
[0048] Existing deep learning models suffer from excessive computational complexity in audio signal distance sensing applications, making it difficult to meet real-time requirements. Furthermore, their robustness to environmental noise or signal interference is poor, resulting in insufficient ranging stability.
[0049] 4) Insufficient multi-source datasets result in low model generalization ability.
[0050] In existing technologies, the training datasets for audio signals are usually from a single source and cannot cover diverse usage scenarios, resulting in insufficient generalization ability of the model in practical applications and difficulty in coping with the complex situations of different environments and devices.
[0051] Technological advancements of this invention:
[0052] 1) High-precision single-base station distance sensing
[0053] This invention accurately captures the correspondence between signal energy distribution and distance by generating energy density maps (EDM) and performing feature analysis using deep learning networks. It can achieve high-precision distance sensing without the need for multiple base stations to cooperate, effectively solving the shortcomings of existing technologies that rely on multiple base station positioning.
[0054] 2) Equipment Difference Compensation and Normalization
[0055] This invention introduces a normalization module to standardize and correct the hardware characteristics of different acquisition devices, effectively reducing the interference of device differences on ranging results. The normalized data ensures the model's adaptability and consistency across multiple devices.
[0056] 3) Improved robustness and real-time performance
[0057] By introducing a spatial attention mechanism and an optimized convolutional neural network structure, this invention significantly improves the model's robustness to environmental noise and multipath interference. Simultaneously, the lightweight model design ensures the system's real-time performance in practical applications, meeting the low-latency requirements of industrial scenarios.
[0058] 4) Construct an EDM dataset with hybrid data sources
[0059] This invention constructs diverse EDM datasets by using hybrid data source acquisition and data augmentation techniques, covering various environments, devices, and signal conditions. This significantly improves the model's generalization ability and adaptability, ensuring that the system maintains high ranging accuracy in different scenarios.
[0060] 5) Simple and efficient deployment and application
[0061] This invention is based on a single base station structure design, which eliminates the need for complex additional hardware deployment, reduces system costs, and facilitates rapid promotion and application in scenarios such as indoor positioning and distance sensing between IoT devices.
[0062] Significant effects of industrial applications:
[0063] 1) Improved ranging accuracy
[0064] Through the technical solution of this invention, the distance perception error of audio signals is reduced to the 10-centimeter level, which meets the high-precision ranging requirements for indoor precise positioning and environmental monitoring.
[0065] 2) Highly adaptable and applicable to a wide range of scenarios
[0066] This invention, through normalization modules and data augmentation technology, adapts to different devices, environments, and signal conditions, and can be widely applied in fields such as smart homes, industrial automation, indoor positioning, and unmanned equipment navigation.
[0067] 3) Reduced system costs
[0068] Based on a single-base station architecture, the need for multi-base station collaboration is eliminated, which greatly simplifies hardware deployment and maintenance costs, while lowering the threshold for industrialization.
[0069] 4) Real-time response and high efficiency
[0070] The system supports millisecond-level response time, enabling reliable distance sensing in real-time dynamic environments, improving user experience and system performance, and meeting the high-efficiency requirements of industrial applications.
[0071] 5) Promote technological development
[0072] This invention achieves an innovative integration of audio signal processing and deep learning technologies, providing a new solution for precise distance sensing technology based on audio signals, and promoting the application and development of intelligent sensing technology in multiple fields. Attached Figure Description
[0073] Figure 1 This is a flowchart of a distance sensing method based on single audio chirp signal features provided in an embodiment of the present invention;
[0074] Figure 2 This is a reference spectrum diagram of the single-base station audio chirp signal provided in an embodiment of the present invention;
[0075] Figure 3 This is a schematic diagram of three-dimensional visualization and energy distribution contour lines of a single-signal EDM provided in an embodiment of the present invention; (a) 1m; (b) 35m;
[0076] Figure 4 This is a schematic diagram of the gradient field distribution of the relative energy of a single-signal EDM provided in an embodiment of the present invention; (a) 1m; (b) 35m;
[0077] Figure 5 This is a schematic diagram illustrating the variation range of the EDM response domain at different distances for three different brand testing machines provided in this embodiment of the invention;
[0078] Figure 6 This is a schematic diagram illustrating the range variation of the EDM normalized response domain at different base station distances provided in this embodiment of the invention;
[0079] Figure 7 This is a schematic diagram of the DPNet static dataset acquisition process provided in this embodiment of the invention; (a) corridor; (b) office;
[0080] Figure 8 This is a schematic diagram of a portion of the DPNet static dataset provided in an embodiment of the present invention;
[0081] Figure 9 This is a diagram of the distance-aware network structure based on EDM provided in an embodiment of the present invention;
[0082] Figure 10 This is a structural diagram of a distance sensing system based on single audio chirp signal features provided in an embodiment of the present invention;
[0083] Figure 11 The test dataset collection environment provided in this embodiment of the invention includes (a) a corridor and (b) a conference room.
[0084] Figure 12 The static distance sensing performance of three test devices provided in this embodiment of the invention is shown in the figures: (a) Nova 8 Pro; (b) Mate 30; (c) Reno5.
[0085] Figure 13 This is a schematic diagram of the distance perception error of three test device sample sets and different environmental sample sets under static conditions provided by the embodiments of the present invention;
[0086] Figure 14 This is a schematic diagram of the classification probability of DPNet corresponding to the correct distance label at the marker point position in the three-round dynamic distance perception provided in the embodiment of the present invention;
[0087] Figure 15 This is a schematic diagram of the overall error distribution of the three-wheel dynamic distance sensing at the marked point provided in the embodiment of the present invention. Detailed Implementation
[0088] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0089] like Figure 1 As shown, this embodiment of the invention provides a distance sensing method based on a single audio signal feature, comprising the following steps:
[0090] Step 1: By preprocessing the raw data stream of the single-base station audio chirp signal, the time-domain audio signal is converted into an energy density map (EDM), and its characteristics are analyzed.
[0091] Step 2: Analyze the impact of equipment differences on EDM characteristics;
[0092] Step 3: Construct an EDM dataset based on a hybrid data source;
[0093] Step 4: Based on the feature analysis of EDM and combined with the spatial attention mechanism, construct a single-base station distance perception network (DPNet) based on deep learning methods.
[0094] (1) Preprocessing and characteristic analysis of audio chirp signals from a single base station
[0095] The Chirp signal used in this invention can be represented as:
[0096]
[0097] Where A(t) is the adjustable signal amplitude, T is the signal duration, and f0 and f e These are the signal start frequency and cutoff frequency, respectively. In this embodiment of the invention, T = 45ms, f0 = 19.5k / 23.5k Hz, f e =16.5k / 20.5k.
[0098] The audio signal is preprocessed by using a Short-Term Fourier Transform (STFT) with a window length of l and an overlap rate of k to calculate the time-frequency map of the Chirp signal with a pixel size of R×C. The value of each frequency point represents the signal energy level, so this time-frequency map is called the energy density map (EDM).
[0099] In this embodiment of the invention, when the STFT window length parameter l is 512 and the overlap ratio parameter k is 87.5%, the calculated EDM size R×C is 33×68, and its single-frequency pixel distance resolution is 45.77cm. Figure 2 As shown. At this resolution, when there are 2 to 3 frequency point pixels (about 5%) misjudgments in the identification of chirp signals in EDM, the error in the time of arrival (ToA) is about 2 to 4 ms, which translates to a distance of about 1 m. The impact on subsequent modeling and distance perception is relatively controllable.
[0100] When facing a base station, the direct-transmission energy of the received signal from the terminal significantly exceeds the reverberation energy and ambient noise energy. The relative energy amplitude at each frequency point is used as the z-axis. Figure 3 The results show the 3D visualization and energy distribution contour lines of EDM at actual distances of 1m and 35m from the base station.
[0101] Figure 3In the signal, the relative energy amplitude of the EDM rises rapidly at the instant the chirp signal is received and remains at a high level during the duration of the direct path; then, as the direct path passes its peak, it gradually transitions into the reverberant portion until the signal disappears. To quantify the trend of the numerical change, the gradient of the EDM relative energy is calculated along the positive x-axis and y-axis using the following formula, and the result is as follows: Figure 4 As shown.
[0102]
[0103] This represents taking the partial derivative with respect to the x-direction of each pixel in the EDM. This represents the partial derivative with respect to the y-direction of each pixel in the EDM, where ▽E is the EDM gradient.
[0104] Figure 4 The arrows in the diagram represent the gradient vectors of each pixel, where the arrow direction indicates the gradient direction and the arrow length indicates the gradient magnitude. Whether at a close distance of 1m or a maximum distance of 35m, the energy amplitude exhibits abrupt gradient changes in the direct path, which undoubtedly provides a powerful feature identifier for EDM image processing.
[0105] (2) Analyze the impact of equipment differences on sensing distance
[0106] The relationship between EDM and sensing distance is influenced by both the distance from the terminal to the base station and the differences in signal response among different terminals. The former is reflected in the different overall energy changes of the signal represented by the EDM at different locations in space, while the latter is reflected in the different signal frequency response and sensitivity of different sampling devices at the same location. If the absolute logarithm of the pixel value at each frequency point in the EDM is defined as the relative energy of the audio signal at that frequency point, and the relative energy range of the EDM is defined as the response domain, then the threshold value of this domain can intuitively reflect the two differences mentioned above.
[0107] Generally speaking, the clearer the boundary interval of the response domain of the same device within an adjacent 1m range, the higher its accuracy in sensing distance; conversely, if the response domain itself is very wide at a certain distance, it is easy to intersect with the response domains within 1m before and after.
[0108] Three smartphones from different brands—Vivo S10, Huawei Nova 8 Pro, and Google Pixel 3—were used as test devices. Audio data facing the base station was collected every 1 meter along the central axis of a 2m × 40m corridor for 60 seconds. The EDM response domain was used as the statistical object. Figure 5 The results of three of the test machines were shown.
[0109] observe Figure 5The data readily reveals that the response domain of a single-frame EDM is linearly inversely proportional to the distance from the terminal to the base station in the range of 1 to 35m, and the slope coefficients are similar. This indicates that although there are significant differences in the EDM energy levels of different devices at the same distance, the change in the response domain of different devices at the same distance interval is similar relative to the overall energy range of the device.
[0110] Therefore, the extreme value normalization method is adopted for EDM to mitigate the differences between devices under a unified standard. Specifically, the minimum energy value at each frequency point of all collected data is set as the normalization lower limit E. lower Any energy value below this threshold is considered noise and assigned a value of 0; the maximum energy value of the frequency point closest to the base station at the test distance is set as the normalized upper limit E. upper Any energy value exceeding this threshold is assigned a value of 1; the EDM is normalized using the following formula, and the result is as follows: Figure 6 As shown:
[0111]
[0112] Where i and j are the row and column indices of the EDM, respectively. The normalized energy of a frequency point ranges from [0, 1]. The stronger the signal energy, the larger the value of the corresponding pixel.
[0113] It can be observed that although the normalized EDM under the Loss state has an overall deviation of about ±1m, after excluding the weak regular signals beyond 35m caused by the reduced amplitude of the direct path component energy change, the normalized response domain range of the EDM of the three test machines approximately exhibits the following linear relationship with the actual physical distance:
[0114]
[0115] Among them, the independent variable Let be the EDM normalized energy value, and D be the estimated distance. Table 1 further compares the physical distances corresponding to the three test machines at different response domain values. The results show that the extreme value normalization method controls the differences between different devices to a maximum. ±1 The level of m.
[0116] Table 1. Ground reference distances for the three tested mobile phones at different normalized response thresholds.
[0117]
[0118] (3) Construct an EDM dataset based on a hybrid data source
[0119] A good network model is not only related to the rationality of its architecture and its task fit, but also to the balance and representativeness of the training data, which play a significant role in the model's generalization ability and reproducibility. Unlike some typical network objectives with strong generalization ability, the distance-aware network (DPNet) proposed in this patent focuses more on the classification performance of audio chirp signals, rather than classification ability on public datasets. Therefore, to improve the robustness and generalization of the model, a high-quality dataset containing a sufficient number of differential elements is constructed, labeled with different physical reference distances (unit: meters). Single-base station audio chirp signals are collected in two different typical indoor scenarios: a corridor and an office, and finally processed into normalized EDM data. Data acquisition was performed using seven different brands or models of devices, including: Huawei Nova 7, Huawei P40, Xiaomi 10 Ultra, Redmi 12C, Oppo Find X6, Vivo X50 Pro, and Google Pixel 3. Figure 7 As shown, in three scenarios, a 1.2m high bracket was erected at a suitable location to place the base station, enabling the base station to broadcast the Chirp signal at a frequency of 1Hz.
[0120] During data acquisition, the first consideration is usually how to choose the spacing between data collection points and the sampling method. For the former, sparse point spacing is beneficial to improving classification accuracy, but it is difficult to respond smoothly to changes in distance; while dense point spacing is beneficial to improving the resolution of distance perception, but both the difficulty of model training and the cost of data acquisition will increase.
[0121] The mapping relationship from the maximum-normalized EDM to physical distance has an error of 1-1.5m from the energy level alone. Therefore, considering the accuracy, sensitivity, and cost of distance sensing, this invention selects 1m as the data acquisition point spacing. For the latter, the mainstream methods include dynamic sampling and static sampling. Dynamic methods usually use high-precision IMUs or portable SLAM to quickly measure the true distance and associate audio data with high-resolution distance tags through interpolation. When a pedestrian walks at a speed of 1.5m / s, the frequency domain of the target signal band will produce a frequency shift of approximately 48.5-57.4Hz and a time shift of 0.65-0.77ms. During dynamic positioning, the random and variable movement direction and speed of the pedestrian will introduce varying degrees of Doppler error. It is quite difficult and impractical to make the training dataset completely cover the Doppler frequency shift error. At the same time, dynamic sampling will also introduce additional errors to static positioning, so this method is not suitable for audio distance sensing. In view of the above-mentioned Doppler error of less than 1ms, this paper chooses the time-consuming but better overall static sampling method to collect data:
[0122] Within a range of 1–35 m from the base station, data acquisition equipment was placed on 1.2 m high supports at 1 m intervals. The ground reference distance was measured using an SNDWAY-100G laser rangefinder (nominal accuracy 3 mm ± 50 ppm). Simultaneously, 60 seconds of audio signal were collected at each distance. Additionally, data acquisition was performed separately in normal environments with no signal to enhance the dataset's noise adaptability.
[0123] In an office setting, due to space constraints, the data collection distance ranges from 1 to 15 meters. After batch processing, the normalized EDM data, totaling 21,852 frames, is archived according to the format of "scene-device-distance-period index." Simultaneously, a copy of the dataset is made, and results from different scenes and devices are mixed. Data is then divided solely by the "distance" label (0-35, 0 representing no signal) for model training. Each of the 36 labels corresponds to an average of 607 EDM frames. The final mixed data source dataset is shown below. Figure 8 As shown.
[0124] (4) Construct a single-base station distance sensing network
[0125] In deep learning, attention mechanisms refer to the weight allocation of different parts or features of the input target, including spatial attention, channel attention, temporal attention, and hybrid attention. Some classic attention-based networks or modules incorporate self-attention in parallel during the stacking of hidden layers. They calculate attention scores using key vectors, value vectors, and query vectors, and then sum these scores over the input to dynamically adjust the focus on different regions of interest.
[0126] 1) DPNet model architecture
[0127] In step 2, a concise linear function model of physical distance and received audio signal is established based on the maximum and minimum normalized EDM obtained from data preprocessing. To further optimize the performance of this model in terms of absolute ranging accuracy and differences between devices, this step constructs a single-base station distance sensing network based on deep learning methods.
[0128] Figure 9 The architecture of the single-base station distance-aware network (DPNet) proposed in this invention is shown. By stacking two spatial attention modules, it adaptively senses EDM image features that can represent the spatial distance variation pattern in the form of residual attention. The architecture details are shown in Table 2.
[0129] As seen in the architecture diagram, DPNet employs a "sandwich" structure of a leader, main body, and suffix, with a total network depth of 34 (the depth of the main branches). The core component is the pre-activation bottleneck residual block (hereinafter referred to as the residual block). While the standard residual block largely solves the optimization problem of deep networks through skip connections, it increases network parameters and reduces computational efficiency. The bottleneck residual block, on the other hand, introduces two 1×1 convolutions to adjust the dimensionality of the data and obtains a smaller-dimensional convolutional layer in the middle layer, reducing the number of parameters and computational cost, and accelerating the convergence of network training. The pre-activation bottleneck residual block further places the BatchNorm and ReLU operations before the convolutional layers and no longer uses activation functions after performing element-wise addition, achieving a purer "direct connection" effect, enhancing the identity mapping characteristics when extracting features, better propagating gradients, and improving training performance.
[0130] In the preamble, a 7×7 convolutional layer and a 3×3 max pooling layer are used to quickly reduce the dimension of the feature map and increase its receptive field.
[0131] The main body consists of two spatial attention modules and connected residual blocks. The number of output channels in each connected residual block is doubled to infer deeper features. In the spatial attention modules, the mask branch uses the same number of residual blocks as the trunk branch, and all residual blocks maintain the same number of input and output channels. Because the mask branch contains more pooling layers, its receptive field is larger than that of the trunk branch, resulting in denser features during gradient backpropagation to infer the weight of each pixel for perceptual distance.
[0132] For the suffix part, an adaptive average pooling layer is used to fix the feature map size to 1×1, and then it is sent to a fully connected layer for network output.
[0133] In DPNet, each attention module consists of a trunk branch and a mask branch. The trunk branch processes network features and increases the receptive field, while the mask branch adds soft weights to the features, controlling the flow of weight information to various objects through bottom-up feedforward and top-down feedback. When the mask branch output, normalized by the sigmoid layer, covers the trunk branch, the dot product operation causes attenuation of global image features and may disrupt the original data identity mapping property of the trunk branch. Therefore, a secondary residual connection is made between the input and output of the attention module. This residual attention learning structure helps the network capture information at different scales and continuously improves the overall network capability as the network depth increases.
[0134] Throughout the model training process, the input EDM is gradually decomposed into increasingly smaller sets of pixels through a feedforward structure, generating a low-resolution feature tensor with strong semantic information. Among them, the feature map output by the spatial attention module with the largest depth is 3×5, which is the smallest unit that can completely reflect the local features of the signal at the perceived distance.
[0135] Table 2. Detailed Architecture of DPNet Model
[0136]
[0137] 2) DPNet model training
[0138] Since the periodic chirp signals broadcast by single-tone base stations are independent of each other, and these signals undergo uniform preprocessing, the entire dataset can be randomly divided into a training set (17472 EDM frames, 36×485) and a validation set (4368 EDM frames, 36×121) at a ratio of 80% to 20%.
[0139] The raw output obtained from each round of DPNet training is transformed into a probability distribution using the Softmax activation function, so that the output corresponds to the probability of each label distance. For the i-th frame EDM input, its predicted distance is... for:
[0140]
[0141] Where, x i L is the original output vector of the model. label Let be the corresponding label distance vector. Training uses the loss function to minimize the absolute error between the predicted distance and the label distance.
[0142]
[0143] in, For the first iThe true label distance corresponding to the frame EDM data input. Adam (Adaptive Gradient Algorithm) and Stochastic Gradient Descent with Momentum (SGDM) were selected as optimizers. Adam's first-order momentum was set to 0.9, and its second-order momentum to 0.999; SGDM's first-order momentum was also set to 0.9. The batch size and learning rate were adjusted as two important hyperparameters; the former was fixed at 4, and the latter was initialized to 0.1. In the early stages of training, Adam with an adaptive learning rate was used to quickly converge the model parameters. Once the learning rate first fell below 0.0001, SGDM was switched to maintain convergence stability, and the learning rate remained unchanged until the model converged. The training environment was built using the PyTorch framework, with the host machine configured as a single NVIDIA TITAN Xp GPU (44GB RAM) and CUDA version 11.5.5. The average loss value of each batch obtained in the first epoch of model training was 6.70m. Model training was stopped when the loss value of five consecutive epochs was optimized to no more than 0.05m. The loss values of the model on the training set and the validation set were 0.82m and 0.92m, respectively.
[0144] like Figure 10 As shown, this embodiment of the invention provides a distance sensing system based on single audio chirp signal features, which is a distance sensing method based on single audio signal features. The system includes:
[0145] The data preprocessing module preprocesses the raw data stream of the single base station audio chirp signal, converting the time-domain audio signal into an energy density map (EDM) and analyzing its characteristics.
[0146] The normalization module analyzes the impact of equipment differences on EDM characteristics;
[0147] The EDM dataset building module constructs EDM datasets based on hybrid data sources;
[0148] The single-base station distance perception network construction module constructs a single-base station distance perception network (DPNet) based on deep learning methods, by combining feature analysis of EDM with spatial attention mechanism.
[0149] The data preprocessing module analyzes the audio chirp signal collected by a single base station, transforming the raw time-domain signal into an energy density map (EDM). The specific process is as follows:
[0150] First, a bandpass filter is used to filter the audio signal, removing non-target frequency band noise from the environment and extracting the effective frequency band features of the Chirp signal.
[0151] The filtered signal is subjected to a short-time Fourier transform (STFT) to convert the time-domain signal into a time-frequency map, thus obtaining the energy distribution of the signal in time and frequency.
[0152] Finally, the time-frequency plot undergoes specific energy statistical processing to generate an energy density map (EDM), which intuitively represents the frequency characteristics and energy distribution of the signal and is used for subsequent feature extraction and modeling.
[0153] The normalization module eliminates the influence of different hardware devices on EDM characteristics by analyzing differences in device hardware characteristics (such as microphone sensitivity and sampling frequency).
[0154] Standardize the frequency distribution range of EDM and map its characteristic values uniformly to the [0,1] interval to reduce the interference of equipment differences on signal energy characteristics.
[0155] By comparing the device's response characteristics with a standard signal, a device calibration factor is generated to compensate for the signal, ensuring that audio signals acquired by different devices have consistent characteristics.
[0156] Normalized EDM data is more suitable for processing by deep learning networks, improving the model's generalization ability and prediction accuracy.
[0157] The EDM dataset building module is responsible for collecting and organizing diverse Chirp signal data sources to form a hybrid dataset, thereby improving the model's adaptability.
[0158] The data sources include chirp signals from different devices, different environments (indoor and outdoor), and at various distances (near, medium, and far).
[0159] The collected raw signals are grouped and labeled, and EDM features are associated with the corresponding actual distances to generate complete training and test datasets.
[0160] Data augmentation techniques have been introduced to expand the dataset size and improve the model's robustness to environmental noise and signal interference by performing time-frequency domain translation, rotation, scaling, and other operations on the signal.
[0161] The deep learning-based single-base station distance-aware network (DPNet) performs distance prediction by analyzing EDM features:
[0162] First, the input layer of DPNet receives the normalized EDM features and extracts the spatial characteristics and local patterns of the signal through a convolutional neural network (CNN).
[0163] By introducing a spatial attention mechanism, the model can focus on frequency band features that significantly affect distance prediction, thereby reducing the impact of background interference on the results.
[0164] The fully connected layer integrates convolutional features and uses a regression model to predict the distance to the signal source. The model is trained and optimized using a large-scale labeled dataset, ultimately achieving high-precision distance perception capabilities.
[0165] DPNet's output layer directly provides the predicted target distance and supports real-time inference, meeting the low latency requirements of practical applications.
[0166] This invention is applicable to applications and products such as geofencing for smart mobile terminals or wearable devices.
[0167] For example, in elderly care, a virtual fence is defined with the audio transmission base station as the center. The terminal or device is continuously measured at a single base station. When the measurement result is greater than the distance threshold, it is considered that the object has left the fence range, and an alarm is issued in the background system.
[0168] If entry is not possible without a key, a specific distance is defined as a virtual fence centered on the audio transmission base station. The terminal or device is continuously measured at a single base station. When the measured distance is less than the distance threshold, the object is considered to have entered the fence area, and entry permission is automatically granted, triggering logical operations such as opening the door.
[0169] The experiments designed in this invention will verify the performance of the proposed single-base station-based distance sensing method in ranging and positioning in various small-area room / hall and corridor environments, including the dynamic and static distance sensing accuracy of DPNet and the generalization ability of DPNet when facing different devices and environments. This section first introduces the experimental data.
[0170] In addition to the 21,852 frames of EDM data used for model training as described in step 3, three different devices—Huawei Nova 8 Pro, Huawei Mate 30, and Oppo Reno5—were added to collect new experimental data. To test DPNet's environmental adaptability, data was collected in different corridor and office scenarios compared to the training data collection, including:
[0171] Test data one. For example... Figure 11(Left) A base station was erected at one end of a 40m long corridor with an average width of 2.6m. Following the data acquisition method in step 3, LoS data (facing the base station) and soft-NLoS data (facing away from the base station) were statically collected for 60s at a distance of 1m from the base station, until 35m away, for a total of 12960 frames of EDM (including no signal) were collected to test the model's generalization ability in terms of perceived distance. Simultaneously, starting from 35m away from the base station, the model walked towards the base station at a speed of approximately 1m / s, collecting dynamic audio LoS data. This process was repeated three times. Markers were placed on the ground at 1m intervals, and timestamps were manually triggered when the model reached a mark. The positions of the ground markers were measured using an SNDWAY-100G laser rangefinder (nominal accuracy 3mm ± 50ppm).
[0172] Test data two. For example... Figure 11 (Right) A base station was set up in one corner of a conference room that is 9m long and 8m wide. Along the diagonal at a maximum distance of 10m, a total of 3960 frames of static EDM (including no signal) were collected using the data acquisition method in step 3. The method of setting ground markers and calculating reference true values is the same as that of test data one.
[0173] DPNet Model Reasonableness Assessment
[0174] Five different network models were designed, including: ① RANet integrating hybrid / channel / spatial attention modules; ② RANet integrating only hybrid / spatial attention modules; ③ DPNet integrating one / two / three spatial attention modules respectively. Using the torchstat tool, Table 3 details the parameter count and computational cost of each network model. The table also uses Top-1 error rate and Top-5 error rate as metrics to express the classification accuracy of each model on 6480 frames of Loss data from three devices.
[0175] Table 3. Main attributes and static distance classification accuracy of different configuration models.
[0176]
[0177] The following control group was set up to explore the design rationale and performance of DPNet:
[0178] Control group 1 compares the Top-1 and Top-5 error rates of Model 1 with those of Model 2 (which does not have a channel attention module). There is no significant difference between the two models, and the model's capabilities have not been significantly improved.
[0179] Control group 2, compared with model 4, both contain two spatial attention modules, but DPNet-34 uses fewer residual blocks in the network suffix, thus greatly reducing both the number of parameters and the amount of computation, and slightly improving the distance classification accuracy.
[0180] Control group 3 was compared with model 4 and models 3 and 5. The former had a shallower network depth and insufficient feature extraction, resulting in poor performance. The latter had an extra attention dot product, which caused useful information to degrade and broke down the granularity of the basic feature units, resulting in a slight overfitting phenomenon.
[0181] Control group 4 compares the Top-5 error rates of each model considering the attention mechanism (WA) and not considering the attention mechanism (NA). The former is significantly better than the latter. Having only the main branch and lacking the mask branch greatly affects the model's distance perception ability.
[0182] The comparative experiments above collectively demonstrate that for EDM data sources, extracting spatial attention features using soft masks is effective, while channel attention has little effect on distance perception in single-channel EDM data. Compared to the reference RANet, the proposed DPNet borrows the advantages of its residual attention connections while optimizing the network architecture. With the same model size, it controls the minimum feature map size for weight allocation to 3×5 through two spatial attention modules, offering advantages in both distance label classification accuracy and computational efficiency.
[0183] DPNet Distance Awareness Performance Evaluation
[0184] The EDM data from the test dataset is fed into DPNet to estimate the perceived distance. The Euclidean distance between this estimated distance and the reference ground distance is used as the error value. Samples are divided according to different test devices and test scenarios. The statistical results of all static samples are as follows: Figure 12 and Figure 13 As shown.
[0185] Table 4 shows the distance-aware performance of DPNet on the static test dataset.
[0186]
[0187] Detailed performance statistics for several sample comparisons are shown in Table 4.
[0188] Based on the results of different test distances, DPNet has a slightly weaker ability to distinguish mid-range samples (16-25m) and is more likely to output excessively large distance estimates; near-range samples (1-15m) and far-range samples (26-35m) have more stable error distributions than mid-range samples.
[0189] Based on the results from different testing devices, the distance perception error distribution of the three phones is similar, with the Nova 8 Pro slightly outperforming the other two phones with a 7.8% and 11.3% reduction in RMSE.
[0190] Based on the results from different testing environments, within the same close-range area, the corridor and conference room scenarios showed almost identical performance, both achieving an RMSE of around 0.7m.
[0191] It is also worth noting that in the test dataset, the no-signal portion was randomly sampled at different physical distances, and it achieved a Top-1 error rate of 1% as a noise control group, indicating that DPNet is capable of processing EDM data that does not contain chirp signals.
[0192] Overall, DPNet's output on the static test dataset tends to be larger than the reference ground truth, with an RMSE of 1.01m. Approximately 95% of the distance perception error is distributed in the range of -1 to 2m, while the remaining approximately 5% of errors exceeding 2m can be identified and eliminated in actual localization processes through methods such as gross error detection.
[0193] For dynamic ranging, the key to DPNet's distance perception performance lies not only in the Top-5 error rate, but also in the probability score of correctly classifying the distance when the tag is triggered. Figure 14 and Figure 15 The paper presents the output probability of DPNet corresponding to the correct distance label at the marked point and the distribution of all distance perception errors during the three rounds of dynamic data acquisition.
[0194] Dynamic distance perception consistently achieves a probability output above 0.6 for correct label distance classification in both near and far distance ranges, while the results in the mid-range range hover between 0.5 and 0.6 or even lower. This directly leads to the probability-weighted distance estimate being more prone to being overestimated or underestimated. However, comparing the probability outputs of three rounds at the same label point, the average standard deviation is 0.05, demonstrating the feature repeatability of EDM at the same spatial location and DPNet's ability to extract similar features. Similar to the conclusions in the static test, the mean error of dynamic distance perception at all labeled points is approximately 0.83m, the RMSE is 0.92m, and the standard deviation is 0.52m.
[0195] The above dynamic and static evaluation results show that when processing EDM data of single base station Chirp signals, DPNet not only achieves a comprehensive distance sensing accuracy and stability of approximately 1m RMSE and approximately 0.6m std, but also demonstrates generalization ability for different devices and scenarios.
[0196] It should be noted that embodiments of the present invention can be implemented in hardware, software, or a combination of both. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated-design hardware. Those skilled in the art will understand that the above-described devices and methods can be implemented using computer-executable instructions and / or included in processor control code, for example, such code provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The devices and modules of the present invention can be implemented by hardware circuitry such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field-programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of the above-described hardware circuitry and software, such as firmware.
[0197] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A distance perception method based on a single audio signal feature, characterized by, Includes the following steps: Step 1: By preprocessing the raw data stream of the single-base station audio chirp signal, the time-domain audio signal is converted into an energy density map (EDM), and its characteristics are analyzed. Step 2: Analyze the impact of equipment differences on EDM characteristics; Step 3: Construct an EDM dataset based on a hybrid data source; Step 4: Based on the feature analysis of EDM and combined with the spatial attention mechanism, construct a single-base station distance-aware network DPNet based on deep learning methods; In step 2, the relationship between EDM and sensing distance is affected by both the distance from the terminal to the base station and the differences in the response of different terminals to the signal. The former is reflected in the different changes in the overall energy of the signal represented by EDM at different locations in space, while the latter is reflected in the different signal frequency response and sensitivity of different sampling devices at the same location. The absolute value of the logarithm of the pixel value at each frequency point in EDM is defined as the relative energy of the audio signal at each frequency point, and the relative energy range of EDM is defined as the response domain. The value of this domain can intuitively reflect the two differences mentioned above. In step 4, the architecture of the single-base station distance-aware network DPNet adaptively senses EDM image features that can represent the spatial distance variation pattern by stacking two spatial attention modules in the form of residual attention. DPNet adopts a "sandwich" structure of preamble, body, and suffix, with the core component being a pre-activated bottleneck residual block; In the preamble, a 7×7 convolutional layer and a 3×3 max pooling layer are used to quickly reduce the dimension of the feature map and increase its receptive field. The main body consists of two spatial attention modules and connected residual blocks. The number of output channels in each connected residual block is doubled to infer deeper features. In the spatial attention modules, the mask branch uses the same number of residual blocks as the trunk branch, and the number of input and output channels in all residual blocks is consistent. Since the mask branch contains more pooling layers, its receptive field is larger than that of the trunk branch, resulting in denser features during the backpropagation of the network to update gradients, inferring the weight of each pixel to the perceptual distance. For the suffix part, an adaptive average pooling layer is used to fix the feature map size to 1×1, and then it is sent to a fully connected layer for network output; In DPNet, each attention module consists of a backbone branch and a mask branch. The backbone branch is used to process network features and increase the receptive field, while the mask branch adds soft weights to the features. Through bottom-up feedforward and top-down feedback, it controls the flow of weight information to various objects. When the output of the mask branch after the Sigmoid layer is normalized covers the backbone branch, the input and output of the attention module are connected by a secondary residual connection.
2. The distance perception method based on a single audio signal feature according to claim 1, characterized by, The Chirp signal used in step 1 is represented as follows: ; in, For adjustable signal amplitude, For signal duration, and These are the signal start frequency and cutoff frequency, respectively.
3. The distance perception method based on a single audio signal feature according to claim 1, wherein, In step 1, the audio signal is preprocessed by a short-time Fourier transform (STFT) with a window length of l and an overlap rate of k, and the time-frequency diagram of the Chirp signal with a pixel size of R×C is calculated. The value of each frequency point represents the signal energy level, so this time-frequency diagram is called the energy density diagram (EDM).
4. The distance perception method based on a single audio signal feature according to claim 1, characterized by, The difference between different devices is controlled in the maximum based on the maximum value normalization method in step 2 the level of m; Normalize EDM using the following formula: ; Where i and j are the row and column indices of the EDM, respectively. The normalized energy of a frequency point ranges from [0, 1]. The stronger the signal energy, the larger the value of the corresponding pixel.
5. The distance perception method based on a single audio signal feature according to claim 1, wherein, In step 3, a high-quality dataset containing a sufficient number of differential elements is constructed, labeled with different physical reference distances in meters. Single-base station audio chirp signals are collected in two different typical indoor scenarios: a corridor and an office, and finally processed into normalized EDM data.
6. The distance perception method based on a single audio signal feature according to claim 1, wherein, Throughout the model training process, the input EDM is gradually decomposed into smaller and smaller sets of pixels through the feedforward structure, generating a low-resolution feature tensor with strong semantic information. Among them, the feature map output by the spatial attention module with the largest depth is 3×5, which is the smallest unit that can completely reflect the local features of the signal at the perception distance.
7. A distance sensing system based on a single audio signal feature according to any one of claims 1-6, characterized in that, include: The data preprocessing module preprocesses the raw data stream of the single base station audio chirp signal, converts the time-domain audio signal into an energy density map (EDM), and analyzes its characteristics. The normalization module analyzes the impact of equipment differences on EDM characteristics; The EDM dataset building module constructs EDM datasets based on hybrid data sources; The single-base station distance-aware network construction module constructs a single-base station distance-aware network DPNet based on deep learning methods, which is based on feature analysis of EDM and combined with spatial attention mechanism.
Citation Information
Patent Citations
Chirp signal detection method under multipath and non-line-of-sight indoor environment
CN115954015A
Indoor audio fingerprint positioning method and system, medium, equipment and terminal
CN116164751A