Research and Implementation of Ultrasonic Positioning System
2026-04-06 05:56:34··#1
Advances in sensor technology, microelectromechanical systems (MEMS), modern networks, and radio communication have driven the emergence and development of wireless sensor networks. Wireless sensor networks have broad application prospects, applicable to numerous fields such as military defense, industrial and agricultural control, urban management, biomedicine, environmental positioning, disaster relief, and remote control of dangerous areas. The principle of ultrasonic positioning is similar to that of radio positioning systems, but due to the significant attenuation of ultrasound waves in air, it is only suitable for a smaller range. The propagation distance of ultrasound waves in air is generally only tens of meters. Short-range ultrasonic ranging systems are already in practical use, with ranging accuracy at the centimeter level. Ultrasonic positioning systems can be used for locating moving objects in unmanned workshops and other locations. 1. Ultrasonic Detection Principle 1.1 Echo Signal The principle of the ultrasonic detection signal analysis system is to achieve analog-to-digital conversion of the ultrasonic detection electrical signal through the coordination of the ultrasonic detector, signal sampling device, and computer, and to complete the storage of the detection data. The computer processes the quantized echo signal data using relevant theories and technologies. Ultrasonic detection is a physical method that uses the properties of ultrasound waves to determine the distance to a target. Ultrasonic testing is a non-destructive testing method that determines the position of an object based on the characteristics of ultrasonic waves reflected from interfaces as they move within the testing area. A common technique in ultrasonic testing is to send short ultrasonic pulses to the object being tested. When the sound waves return from discontinuous structures or boundaries of the object, their echo waveforms are acquired. When the wave touches the front wall of the object, a narrowband random wave with several oscillation cycles is generated, called the initial wave. Simultaneously, some ultrasonic waves penetrate the object and touch the rear wall, generating another oscillating echo, called the bottom wave. By using the time interval between the initial and bottom waves and the known velocity of the sound wave within the object, the distance to the object can be calculated. Similarly, when the sound wave touches discontinuous target locations such as pores or impurities within the object, echoes are also generated, providing information about the target's location, such as its approximate position within the testing area. 1.2 Model Establishment Ultrasonic testing deals with oscillating waves, which have the characteristics of narrowband random signals. Traditional ultrasonic testing equipment uses hardware detection to extract the echo envelope, which cannot guarantee detection accuracy or precise positioning of the main peak. Since the target echo position directly determines the measurement accuracy, especially for moving targets, accurately determining the echo position is the key technology. This article introduces a signal acquisition system including sensor signal acquisition design and hardware design and construction for information transmission between the sensor and MOTE. Ultrasonic sensors are characterized by their good directionality and centimeter-level positioning accuracy. Some high-precision positioning systems, such as DPEG and Crickets, use ultrasonic sensor-based ranging methods. The working principle of an ultrasonic sensor is as follows: a sound wave is emitted at time zero. Assuming the sensor receives the returned ultrasonic wave after time t, according to the formula s=vt, where v is 34000cm/s, and the actual ultrasonic emission time unit is milliseconds (mm), which is equivalent to 10⁻⁶s, the distance value s can be calculated using this formula. The value s is related to the sensor's timer and is a sampling value closely related to the hardware device. In the system, assuming the ultrasonic sensor's timer is 16-bit, then 2^16 = 65536, 65536/58 = 1129, meaning the locating range is approximately 11H. In practice, we found a linear relationship between the collected data and the actual distance; the 16-bit timer could only detect distances within 1.46m, a disastrous limitation for a target positioning system. To address this, we reduced the time accuracy to improve the ultrasonic's working range. Reducing the time accuracy to 1/3 of the original increased the actual detection range by three times, reaching 4.8m. Practical testing proved this design is feasible and provides good and accurate ranging results. 2. System Composition The system consists of an ultrasonic sensor, a node gateway, a wireless network, a laptop, and a remote-controlled toy car, as shown in Figure 1. Data from the wireless sensor network is transmitted to the computer through the gateway. The service program parses and processes the data, storing a portion of the data in a data array after event classification for analysis and querying. Another part is used solely for data fusion between different sensors. After communication control, the position information of different sensors is discarded by the sensor nodes, as their storage space and energy are limited; large amounts of data storage would not only waste space but also drain the battery. The database can select data for position estimation as needed, and then adjust parameters based on factors such as wind direction, obstacles, and ground elevation to determine the target's location within the detection area. The backend system communicates with the wireless sensors via a wireless gateway. These messages also need to be communicated to the program module responsible for the user interface, displaying the located information visually. Ultrasonic positioning systems differ from radio positioning in their implementation. Radio signals from different transmitting points can be distinguished using different frequencies, which is difficult to achieve with ultrasonic systems. Therefore, a method is needed to differentiate the ultrasonic signals from each transmitting point. We use address-coded radio triggering circuits to trigger each transmitting point individually. Taking an ultrasonic positioning system with fixed transmitting points and a main receiving unit as an example, the main unit consists of a microprocessor circuit, an ultrasonic receiving circuit, and a radio-coded triggering circuit; the transmitting point part consists of an ultrasonic transmitting circuit and a radio-coded receiving circuit. The system's operation begins with the microprocessor selecting the address of the transmission point to be triggered, activating the transmission circuit, and starting a timer. If a signal is received within a given time, the distance from the subject to the transmission point is calculated from the delay time. Compared to ultrasound, the transmission time of radio waves is negligible. If no signal is received within a given time, it is assumed that the distance from the subject to the transmission point has exceeded the receivable distance. Once sufficient transmission point signals are received, the subject's position coordinates can be calculated from the distances to each transmission point. Since the speed of ultrasonic waves in air varies with environmental conditions, calibration of the measurement results is necessary to improve measurement accuracy. The MICA2 connects to the ultrasonic sensor via a 51-array interface, and the ultrasonic sensor is powered by an external battery pack. The MICA2's data processing unit uses the Atmel Atmega128L microcontroller, an 8-bit microcontroller based on a RISC architecture manufactured using low-power CMOS technology, currently the most powerful microcontroller in the AVR series. The AVR core integrates 32 working registers and the instruction set, with all working registers directly connected to the ALU. This allows for the simultaneous execution of a single instruction and access to two independent registers within a single clock cycle, improving code efficiency and delivering approximately 10 times the performance of a typical microcontroller. The Atmega128L boasts abundant resources and low power consumption. It features 128KB of on-chip program Flash, 4KB of data SRAM, and expandable E2PROM up to 64KB. Additionally, it includes eight 10-bit ADC channels, two 8-bit and two 16-bit hardware timers/counters capable of operating in various modes; eight PWM channels; a programmable watchdog timer and on-chip oscillator; an on-chip analog comparator; UART; SPI; and I2C bus interfaces. The JTAG interface, in addition to the normal operating mode, offers six different levels of low-power operation, each with varying power consumption. The MICA2's data transmission unit module consists of the CC2420 wireless communication module, a low-power, short-range, ZigBee-compliant, highly integrated industrial RF transceiver module manufactured by Chipson. The node's MAC and PHY layer protocols conform to the 802.15.4 standard, with the MAC layer employing an ESMA-CA-based mechanism. This chip requires minimal external components, ensuring the effectiveness and reliability of short-range communication. The data transmission unit module supports data transmission rates up to 250 kbit/s, enabling rapid multi-point-to-multi-point networking. The system is small, low-cost, and low-power, suitable for long-term battery power supply, and features hardware encryption, security, reliability, flexible networking, and strong resilience. 3. Software System Design The software system deploys the designed target positioning system on actual physical hardware and conducts related experimental research. The software flowchart of the application system is shown in Figure 2. In the initial stage, all nodes are in working state, and the duty node is selected to monitor the coverage area through the node grouping component. When the duty node locates an event, it wakes up neighboring nodes to collect data. The nodes aggregate the collected data to the head node, which performs preliminary processing to reduce routing congestion caused by erroneous data being transmitted to the gateway. The gateway transmits the data received from the lower layer to the base station with strong processing capabilities to estimate the approximate location of the event. 4. Communication Control Structure During the communication process of network nodes, idle listening when nodes have no tasks consumes considerable energy resources. At the same time, wireless signals suffer from packet loss, crosstalk, and congestion caused by partial message aggregation during forwarding. These issues must be considered in the design of the network communication control structure. To improve the scalability and adaptability of the system, multiple system components are constructed, including node grouping, energy management, routing selection, time synchronization, and location estimation, which facilitates further modification and improvement of the system. Compared with the layered structure of the current Internet network, wireless sensor network systems in practice are generally divided into a physical layer, a wireless link layer, a routing layer, and an application layer, with messages being exchanged between layers through interfaces. Currently, the transport layer is not used in sensor networks, primarily because traditional message acknowledgments cause significant energy consumption in wireless sensor networks. Sensor networks transmit massive amounts of data and are not sensitive to small data losses, thus the transport layer's importance in wireless sensor networks is not significant. Wireless sensor networks suffer from limited node energy, low data transmission rates, and poor reliability and security. Furthermore, nodes may migrate in or out, fail due to energy depletion, or relocate during system operation, causing changes in network topology and communication link control structure. To extend the lifespan of wireless sensor networks, the network communication control structure should ideally meet the following conditions: when the system is in an idle listening state, a few nodes should maintain the basic link while other nodes enter dormancy; due to the relatively poor reliability of nodes, redundancy of the backbone link needs to be ensured; the large amount of data transmitted by numerous nodes is a heavy task for the entire network, and effectively utilizing data fusion and distributed processing techniques can reduce redundant data and the number of wireless communications; scalability and robustness should be improved to adapt to various changes such as node migration, removal, or failure. In applications, the energy consumption of wireless sensor network nodes is closely related to the communication methods employed. In a real-world environment, continuous positioning within a defined network coverage area revealed a high event prediction accuracy and a low false alarm rate. This indicates that while correct data from a node may be transmitted, incorrect data might be transmitted at the next moment, highlighting the necessity of measures to limit the false alarm rate. Real-time performance is another crucial aspect of target positioning systems. Even the most perfect calculations are meaningless if the system cannot promptly relay the network's processing results. Theoretically, system latency is a decisive factor. 5. Conclusion Ultrasonic positioning systems can be used for contactless positioning within a certain range, achieving an accuracy of up to 1 cm. Due to the significant environmental influences on ultrasonic wave propagation, outdoor use is not recommended. In practical applications, the application circuit can be appropriately modified based on the environment and specific requirements. For example, coded signals can be directly incorporated into the ultrasonic signal, allowing for direct object identification. To increase receiving sensitivity, a reflective device similar to a radar antenna can be used. This paper processed the echo signal, reducing noise and successfully completing the initial stages of ultrasonic signal processing. The established mathematical model for ultrasonic echo signal processing is easy to implement; it has high target positioning accuracy, avoiding the large errors of traditional analog detectors, and provides a reference for the accurate positioning of dangerous targets.