Wireless ranging method and ranging system based on neural network
Through the wireless ranging method based on neural network, the problem of difficult to find a high degree mathematical model in the prior art is solved, and higher ranging accuracy and applicability are achieved.
Patent Information
- Application Number
- CN202411531906.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-21
AI Technical Summary
Existing wireless ranging and positioning technologies based on received signal strength are difficult to find mathematical models with strong versatility and high matching, resulting in low ranging and positioning accuracy and large errors.
采用基于神经网络的无线测距方法,通过采集发射机的发射功率、接收机的信号强度及环境数据,建立训练样本集,并通过神经网络模型进行训练,优化权重值以提高测距精度。
By fully considering the impact of environmental data on the fading of wireless signal strength, the adaptability and accuracy of the ranging model are improved, the difficulty of establishing a mathematical model is reduced, and the applicability of the ranging model is enhanced.
Smart Images

Figure CN119493077A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wireless distance measurement, and in particular to a wireless distance measurement method and a distance measurement system based on a neural network. Background Art
[0002] Distance measurement and positioning play an important role in modern science and engineering. Distance measurement is to measure and determine the distance between objects through a variety of technologies. Distance measurement is the basis of positioning, and the position and direction of an object in space are calculated through information such as the distance or angle between the object and multiple reference points.
[0003] Distance measurement and positioning through the transmission and reception of radio waves is a conventional method. The specific subdivisions of ranging-based positioning algorithms include those based on received signal strength (RSSI), signal arrival time (TOA), signal arrival time difference (TDOA) and signal arrival angle (AOA). These algorithms use ranging information to calculate the position of the object through different mathematical models.
[0004] RSSI measures the strength of the signal received by the receiving end under the premise of knowing the strength of the transmitted signal, estimates the distance between the receiving end and the transmitting end according to the channel fading model of the environment, and then converts the coordinate value of the receiving point according to the coordinates of the transmitting point. The advantage of this method is that it is simple to implement and low cost, so it has also received high attention. However, the key to this method is to accurately establish a mathematical model of radio signal strength fading. Only when the established fading model matches the actual fading situation well can the ideal positioning accuracy be obtained. However, the attenuation of the energy of the radio signal during the propagation process is not only related to the propagation distance, but is the result of the action of multiple factors. Therefore, this positioning method has low positioning accuracy in practical applications. Summary of the invention
[0005] In view of the defects of the background technology, the present invention proposes a wireless ranging method and ranging system based on a neural network to solve the problem that it is difficult to find a mathematical model with strong universality and high matching degree when performing ranging and positioning based on the received signal strength, thereby resulting in low ranging and positioning accuracy and large errors.
[0006] The present invention proposes a wireless distance measurement method based on a neural network, comprising:
[0007] Collect the transmission power of the transmitter, collect the signal strength of the receiver, calculate the power change of the wireless signal transmitted from the transmitter to the receiver, and collect the environmental data that affects the power change to establish a training sample set;
[0008] Collect the GPS coordinates of each sample transmitter and receiver, and obtain the actual distance through calculation;
[0009] Establish a distance measurement model based on a neural network and train the distance measurement model: input the sample into the distance measurement model to obtain the corresponding predicted distance, compare the predicted distance with the actual distance to obtain the loss value, and then iteratively optimize the weight value of the hidden layer of the neural network;
[0010] When performing ranging, the collected signal strength, power change and environmental data are input into the ranging model to obtain the target distance.
[0011] Preferably, the environmental data includes air humidity and PM2.5 value.
[0012] Preferably, when collecting training samples, a test range with a radius of 0-5000 meters centered on the transmitter is established, and after the receiver position is determined within the test range, the transmitter selects a variety of transmission powers for transmission;
[0013] Transmit power includes 0.5W, 1W, 2W, 3W and 5W.
[0014] Preferably, air humidity data are collected on sunny days, cloudy days and rainy days respectively, and training samples are established for the air humidity data of different weather conditions respectively.
[0015] Preferably, training samples are established for different radio frequency chips and different antenna types in the transmitter and the receiver respectively.
[0016] Preferably, training samples are established for different antenna shapes in the transmitter and the receiver respectively.
[0017] Preferably, the weight values of the hidden layer of the neural network are iteratively optimized using the L-BFGS algorithm.
[0018] The present invention also proposes a wireless distance measurement system, which performs distance measurement by any of the wireless distance measurement methods described above;
[0019] The wireless ranging system includes a transmitter, a receiver, an environmental data collector and a computing device;
[0020] The transmitter is used to transmit a ranging signal and send a transmission power value to a computing device;
[0021] The receiver is used to receive the ranging signal and send the signal strength to the computing device;
[0022] The environmental data collector is used to collect environmental data that affects the received power and send the environmental data to the computing device;
[0023] The computing device is equipped with a neural network-based ranging model and obtains the distance between the receiver and the transmitter based on signal strength, power variation and environmental data.
[0024] Preferably, the computing device is a cloud server, and the transmitter and the receiver communicate with the cloud server via a network;
[0025] The environmental data collector can obtain environmental data from the network and send it to the cloud server.
[0026] The beneficial effects of the present invention include: the present invention establishes a ranging model through the change of wireless signal power, and fully considers the influence of environmental data such as air humidity and PM2.5 on the fading of wireless signal strength in the model, and uses discretization and fuzzification to improve the adaptability of the model, thereby reducing the difficulty of establishing a mathematical model and improving the ranging accuracy; the present invention trains different ranging models through different transmission powers, different transmission chips, and different antennas instead of adopting a unified mathematical model, thereby improving the applicability of the ranging model; when the existing ranging model is not applicable, enhanced training can be performed by collecting new training samples without continuous debugging based on experience, thereby reducing the difficulty and workload. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The present invention is described in detail below with reference to the embodiments and accompanying drawings, wherein: Figure 1 This is a comparison chart between the theory and actual situation of signal strength attenuation in natural environments.
[0028] Figure 2 It is a test range diagram of the training samples of the present invention.
[0029] Figure 3 It is a neural network diagram of the distance measurement model of the present invention.
[0030] Figure 4 It is a schematic diagram of the distance measurement system of the present invention.
[0031] Figure 5 It is a network structure diagram of the wireless ranging system of the present invention. DETAILED DESCRIPTION
[0032] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0033] Thus, a feature indicated in this specification will be used to illustrate one of the features of an embodiment of the present invention, rather than implying that each embodiment of the present invention must have the described feature. In addition, it should be noted that this specification describes many features. Although some features can be combined together to illustrate possible system designs, these features can also be used in other combinations that are not explicitly described. Thus, unless otherwise stated, the described combinations are not intended to be limiting.
[0034] The principle of the present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0035] The present invention proposes that the key to distance measurement through RSSI is to accurately establish a mathematical model of wireless signal strength fading. Only when the established fading model matches the actual fading situation well can the ideal distance measurement accuracy be obtained. However, the energy attenuation of wireless signals during propagation is not only related to the propagation distance, but is the result of multiple factors. Therefore, this distance measurement method has low distance measurement accuracy in practical applications. The current mathematical model of wireless channels is This formula can be used to calculate the distance d from the signal strength PL(d). In the formula, d is the distance between the transmitter and the receiver, d0 is the reference distance; k is the channel attenuation index, which is generally 2 to 4; Xa is a Gaussian distribution random variable with a mean of zero; PL(d0) is the signal strength at the reference distance, which can be obtained through experience or from the hardware specification definition; PL(d) is the signal strength at a distance d from the transmitter.
[0036] The reasons for the low accuracy of the measurement results of the above formula include: since the energy attenuation of the wireless signal during the propagation process is not only related to the propagation distance, but also affected by multiple factors, and the variables Xa and PL (d0) are difficult to determine, it is difficult to establish an accurate mathematical model of wireless signal strength fading; the energy attenuation may not be linear but discrete, and the linear model is difficult to match with the actual situation, and the linear model may be completely unsuitable in some scenarios; theoretically, as the distance increases, the received RSSI will decrease due to the attenuation of the wireless signal. Therefore, based on this relationship, the distance between the two nodes can be directly obtained by the RSSI value. In actual situations, the conversion model between RSSI and distance is usually used to convert the monitored signal strength value into a distance value. In free space, the RSSI value decreases proportionally with d2 (the distance between the receiving signal device and the transmitting signal device). In actual environments, the main factor affecting the RSSI value is the multipath effect. The multipath effect makes the frequency value reaching the signal receiving device a signal frequency reconstructed by multiple interference waves with different amplitudes and phases and the original transmitted signal, thereby causing frequency selective fading, that is, the error of the measured RSSI value. The second factor that affects the received RSSI is the shadow effect, that is, when the frequency selective fading in the environment is eliminated, the RSSI value will produce errors due to obstacles encountered during the signal propagation process. Another reason that affects the RSSI error is the loss of the propagation signal on the path. The measured RSSI value is the difference in the battery model of the receiving signal device and the transmitting signal, which also makes the received frequency different.
[0037] In actual applications, it is difficult to match the antenna, RF chip, mold, signal interference and other issues with the same model. When the effect is not good, it is difficult to find suitable parameters, which requires a lot of experience and debugging. Because the matching degree of the mathematical model is very low, it is usually regarded as a rough ranging technology, which may produce a ranging error of +150%.
[0039] Based on the above defects, the present invention proposes a wireless ranging method based on a neural network to solve the problem that it is difficult to find a mathematical model with strong universality and high matching degree when measuring distance based on the received signal strength, resulting in low ranging and positioning accuracy and large errors.
[0040] Wireless ranging methods include:
[0041] Collect the transmission power of the transmitter, collect the signal strength of the receiver, calculate the power change of the wireless signal transmitted from the transmitter to the receiver, and collect the environmental data that affects the power change to establish a training sample set;
[0042] Collect the GPS coordinates of each sample transmitter and receiver, and obtain the actual distance through calculation;
[0043] Establish a distance measurement model based on a neural network and train the distance measurement model: input the sample into the distance measurement model to obtain the corresponding predicted distance, compare the predicted distance with the actual distance to obtain the loss value, and then iteratively optimize the weight value of the hidden layer of the neural network;
[0044] When performing ranging, the collected transmission power, power change and environmental data are input into the ranging model to obtain the target distance.
[0045] This embodiment establishes a ranging model according to the change of wireless signal power, and fully considers the impact of the environment on the fading of wireless signal strength in the model, and uses discretization and fuzzification to improve the adaptability of the model, thereby reducing the difficulty of establishing a mathematical model and improving the ranging accuracy.
[0046] Among the environmental factors that affect power changes, this embodiment focuses on air humidity and PM2.5 value.
[0047] Air humidity has a significant impact on wireless signals, which can cause signal strength to weaken. When air humidity increases, water molecules absorb the energy of radio waves, resulting in a shorter signal propagation distance and a weakened signal strength. This phenomenon is particularly evident on rainy days, because rain absorbs and scatters electromagnetic waves, further weakening signal strength. Specifically, the effects of air humidity on wireless signals mainly include: absorption effect, water molecules in the air absorb the energy of radio waves, especially electromagnetic waves in the high-frequency band are more easily absorbed, which can cause signal strength to weaken and the transmission distance to shorten; scattering effect, rain scatters electromagnetic waves, causing the signal to deviate during propagation, resulting in weakened signal strength.
[0048] The impact of PM2.5 on wireless signals is mainly reflected in the degree of air pollution, which will affect the propagation and reception of wireless signals. PM2.5 particles will scatter and absorb wireless signals, resulting in a weakening of signal strength. Specifically, the impact of PM2.5 particles on wireless signals includes: scattering effect, PM2.5 particles will scatter wireless signals, causing the signals to deflect during propagation, resulting in a reduction in signal coverage; absorption effect, PM2.5 particles will absorb the energy of wireless signals, causing the signal strength to weaken, especially in an environment with high concentrations of PM2.5, this effect is more obvious; multipath propagation, the presence of PM2.5 particles will increase the multipath propagation of signals, resulting in increased signal attenuation and interference.
[0049] The hardware itself also affects the ranging accuracy. For example, different RF chips, different antenna types, and antenna shapes will directly affect the quality of wireless signals, such as signal coverage and signal stability. High-quality RF chips and antennas can help reduce signal interference and improve the stability of signal transmission. Different types of antennas, such as omnidirectional antennas and directional antennas, have their own advantages. Omnidirectional antennas are suitable for wide coverage, while directional antennas are suitable for strong signal transmission in a specific direction. The installation location and environment of the antenna will also have an important impact on the signal quality. Factors such as direct line of sight, height, directionality, and environmental interference will affect the signal quality.
[0050] When collecting training sample sets, being able to pay more attention to the impact of various factors on ranging accuracy will enable the neural network to obtain smaller errors after training.
[0051] First, establish a test range with a radius of 0-5000 meters centered on the transmitter, such as Figure 1 As shown, after the receiver position is determined within the test range, the transmitter selects a variety of transmission powers for transmission. The main simulation application objects of this embodiment are walkie-talkies and mobile phones. The transmission power covers the commonly used RF chip power, including 0.5 watts, 1 watt, 2 watts, 3 watts and 5 watts, and training samples are established respectively.
[0052] Secondly, air humidity data are collected on sunny days, cloudy days and rainy days, and training samples are established for the air humidity data in different weather conditions.
[0053] In addition, training samples are established for different RF chips, different antenna types, and different antenna shapes in the transmitter and receiver, and finally a data collection table in the following format is obtained.
[0054]
[0055] In order to obtain more accurate data, a part of the data is directly obtained through fixed-point measurement for correction, as shown in the following table.
[0056]
[0057] After normalizing the collected data, put it into Figure 2 The distance measurement model neural network shown in the figure is deduced and trained. When used, power changes, signal strength, air humidity and PM2.5 values are input, and the distance between the transmitting point and the receiving point is deduced through the model. The details are as follows:
[0058] First, input feature item X, that is, the independent variable item. The neural network model constructs pseudo features from feature item X. Input power change, signal strength, air humidity, PM2.5, and combines the activation function to construct some pseudo feature items. Pseudo feature items can be laid out in multiple levels according to computing power. This embodiment uses 4 layers, and each level can have multiple neurons. Finally, the output is calculated by the mathematical optimization algorithm.
[0059] Considering the amount of data and computing power, the neural network parameters used in this method are as follows:
[0060] Hidden neurons: 4 layers
[0061] Number of neurons: 150 in the first layer, 100 in the second layer, 80 in the third layer, 100 in the fourth layer
[0062] Activation function: f(x) = tanh(x)
[0063] Weight optimization method: lbfgs: quasi-Newton method
[0064] Penalty coefficient: 0.0001
[0065] Maximum number of iterations: 100
[0066] Optimization tolerance: 0.001
[0067] Batch size: auto
[0068] Custom batch size: 20
[0069] Conduct a large number of sample training, such as Figure 3 As shown in the figure, when the pass rate of the trained model in the test set exceeds 90%, the model is confirmed. When a new RF chip or antenna type or shape is added, the accuracy may drop. In this case, incremental training can be performed by collecting new data instead of retraining all the data, reducing computing power and data collection costs.
[0070] The present invention is a supplement to the existing distance measurement method, especially for walkie-talkie and mobile phone users. According to power changes and environmental data, the distance measurement model is trained by different transmission powers, different transmission chips, and different antennas instead of using a unified mathematical model, thereby improving the applicability of the distance measurement model.
[0071] The present invention also proposes a Figure 4 The wireless ranging system shown performs ranging by the wireless ranging method of any of the above embodiments;
[0072] The wireless ranging system includes a transmitter, a receiver, an environmental data collector and a computing device;
[0073] The transmitter is used to transmit a ranging signal and send a transmission power value to a computing device;
[0074] The receiver is used to receive the ranging signal and send the received power value to the calculation device;
[0075] The environmental data collector is used to collect environmental data that affects the received power and send the environmental data to the computing device;
[0076] The computing device is equipped with a neural network-based ranging model and obtains the distance between the receiver and the transmitter based on signal strength, power variation and environmental data.
[0077] The computing device may be a cloud server, and the transmitter and the receiver communicate with the cloud server via a network, including wireless uploading of transmission power values, receiver signal strength, etc.
[0078] The environmental data collector can obtain environmental data from the Internet and send it to the cloud server, such as obtaining local humidity data and PM2.5 data from the meteorological service website. When environmental data cannot be obtained from the Internet, manual collection is required.
[0079] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A wireless distance measurement method based on a neural network, characterized in that: include: Collect the transmission power of the transmitter, collect the signal strength of the receiver, calculate the power change of the wireless signal transmitted from the transmitter to the receiver, and collect the environmental data that affects the power change to establish a training sample set; Collect the GPS coordinates of each sample transmitter and receiver, and obtain the actual distance through calculation; Establish a distance measurement model based on a neural network and train the distance measurement model: input the sample into the distance measurement model to obtain the corresponding predicted distance, compare the predicted distance with the actual distance to obtain the loss value, and then iteratively optimize the weight value of the hidden layer of the neural network; When performing ranging, the collected signal strength, power change and environmental data are input into the ranging model to obtain the target distance.
2. The wireless distance measurement method based on neural network as claimed in claim 1, characterized in that: The environmental data includes air humidity and PM2.5 value.
3. The wireless distance measurement method based on neural network as claimed in claim 2, characterized in that: When collecting training samples, a test range with a radius of 0-5000 meters centered on the transmitter is established. After the receiver position is determined within the test range, the transmitter selects a variety of transmission powers for transmission; The transmission powers include 0.5 watts, 1 watt, 2 watts, 3 watts and 5 watts.
4. The wireless distance measurement method based on neural network as claimed in claim 3, characterized in that: Air humidity data are collected on sunny days, cloudy days and rainy days, and training samples are established for the air humidity data in different weather conditions.
5. The wireless distance measurement method based on neural network as claimed in claim 3, characterized in that: Training samples are created for different RF chips and different antenna types in transmitters and receivers.
6. The wireless distance measurement method based on neural network as claimed in claim 5, characterized in that: Training samples are created for different antenna shapes in the transmitter and receiver.
7. The wireless distance measurement method based on neural network as claimed in claim 1, characterized in that: The L-BFGS algorithm is used to iteratively optimize the weight values of the hidden layer of the neural network.
8. A wireless ranging system, characterized in that: Performing ranging by the wireless ranging method according to any one of claims 1 to 7; The wireless distance measurement system includes a transmitter, a receiver, an environmental data collector and a computing device; The transmitter is used to transmit a ranging signal and send a transmission power value to the computing device; The receiver is used to receive the ranging signal and send the signal strength to the computing device; The environmental data collector is used to collect environmental data that affects the received power and send the environmental data to the computing device; The computing device is equipped with a distance measurement model based on a neural network, and obtains the distance between the receiver and the transmitter according to signal strength, power change and environmental data.
9. The wireless ranging system according to claim 8, characterized in that: The computing device is a cloud server, and the transmitter and the receiver communicate with the cloud server via a network; The environmental data collector can obtain environmental data from the network and send it to the cloud server.