Visible light indoor positioning method based on diffusion model
By adopting a visible light positioning system based on diffusion model in indoor positioning, using LED light signals and PD sensors combined with diffusion model and neural network, the problem of degradation of indoor positioning accuracy is solved, and higher positioning accuracy and stability are achieved.
Patent Information
- Application Number
- CN202411724951.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-04-01
AI Technical Summary
Existing indoor positioning technology cannot provide accurate positioning services in buildings, and system noise and ambient light interference lead to a reduced positioning accuracy.
A visible light positioning system based on the diffusion model is adopted to realize positioning through the optical signal and PD sensor in the visible light band of the LED, the diffusion model is used to reduce the interference of system noise and environmental noise, and the positioning calculation is performed in combination with a fully connected neural network.
It improves the accuracy and stability of indoor positioning, reduces the impact of system noise and ambient light on positioning accuracy, and provides more reliable indoor positioning services.
Smart Images

Figure CN119738778A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a novel visible light indoor positioning method and device based on a diffusion model, which adopts a diffusion model and an embedded device to achieve real-time positioning of a target and can reduce the influence of system noise and ambient light on positioning accuracy, belonging to the field of visible light positioning. Background Art
[0002] The development of intelligent devices such as the Internet of Things and autonomous mobile robots has increased the requirements for indoor positioning technology. However, the signals of outdoor positioning technologies such as Beidou satellites are blocked by buildings and attenuated, making it impossible to provide accurate indoor positioning. In indoor positioning, system noise can lead to a decrease in positioning accuracy. Therefore, it is worthwhile to design a system that provides accurate and reliable indoor positioning services. Summary of the invention
[0003] The visible light positioning system based on the diffusion model proposed in the present invention is an online positioning method, which has the following unique advantages: (1) The signal transmitting end of the visible light positioning system based on the diffusion model adopts the light signal of the LED visible light band, which has the characteristics of safety, anti-electromagnetic interference, and rich spectrum resources; (2) The signal receiving end of the system adopts the PD sensor, which is small in size, low in cost, light in weight, and easy to install on smart devices such as Internet of Things devices and autonomous mobile robots for use. (3) The system adopts the diffusion model to reduce the interference of system noise and environmental noise on the received signal, thereby improving the accuracy and stability of indoor positioning.
[0004] The visible light positioning method based on the diffusion model proposed in the present invention first modulates each LED using PWM modulation at the transmitting end, and the modulation frequency of each LED is different. The receiving end uses PD to receive the light signal of the LED, and PD converts the light signal into the received signal strength. The received signal strength will be interfered by system noise and environmental noise. The received signal strength is input into the trained diffusion model for noise reduction. After obtaining a clean received signal strength signal, a fully connected neural network is used for positioning.
[0005] The method specifically comprises the following steps:
[0006] S1: Offline stage: for the indoor positioning environment to be tested, the ground is divided into N positioning units of uniform size;
[0007] S2: PWM modulate the LED at the transmitting end. The frequency of the LED is different. At this time, the different frequencies are used as the ID of the LED. The corresponding LED can be identified by the ID at the receiving end. Fix the configured N LEDs above the measurement space;
[0008] S3: In each positioning unit at the receiving end, a PD sensor is used to collect the light signal of the LED, and the light signal is converted into a current signal through a photoelectric conversion circuit;
[0009] S4: The photocurrent outputs an analog voltage value to the microprocessor through the amplifier circuit. The microprocessor uses the ADC channel to convert the analog voltage signal into a digital voltage signal. The voltage signal is grouped into a length of 1024, and each cell collects several groups;
[0010] S5: Preprocess the training data, copy the received signal strength of all positioning units, add additive Gaussian white noise to one copy to simulate shot noise, thermal noise, background noise and dark current noise. The other copy is not added with noise as a clean data set, and part of these two data sets are used as training data and the other part is used as test data to train the diffusion model;
[0011] S6: The received signal strength is affected by the system noise, which reduces the positioning accuracy. The present invention proposes to introduce a diffusion model to remove noise. Its working principle is to destroy the original training data by continuously adding Gaussian noise, and then learn to recover the data through the inverse diffusion process. The noise predictor in the model is trained in the process of diffusion and inverse diffusion. A well-trained diffusion model can generate clean data based on the input noisy data;
[0012] S7: The training part of the diffusion model can be divided into two steps - diffusion and inverse diffusion. The diffusion model is a generative model that works by corrupting the original training data by continuously adding Gaussian noise, and then learning to recover the data through the inverse diffusion process. The noise predictor in the model is trained during the diffusion and inverse diffusion process. A well-trained diffusion model can generate data from randomly sampled noise;
[0013] S8: input the data of the noise data set into the trained diffusion model to obtain the received signal strength value after denoising, and obtain the spectrum diagram of each positioning unit through fast Fourier transform (FFT);
[0014] S9: Establish a mapping relationship between the corresponding relationship between frequency and amplitude in the spectrum graph and its coordinates in the real space, and use a fully connected neural network to train this relationship, where the input of the neural network is the frequency and its corresponding amplitude presented in the form of a sequence signal, and the output is the coordinate;
[0015] S10: Deploy the diffusion model and neural network on the microprocessor, and display the positioning coordinates calculated by the microprocessor in real time on the screen. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to make the purpose, technical solution and beneficial effects of the present invention clearer, the present invention provides the following drawings for illustration:
[0017] Figure 1 The received signal strength acquisition method and signal processing diagram of the visible light positioning based on the diffusion model described in the present invention;
[0018] Figure 2 It is the visible light positioning experimental platform described in the present invention;
[0019] Figure 3 This is the training process of the diffusion model. DETAILED DESCRIPTION
[0020] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0021] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0022] As attached Figure 1 As shown in the figure, firstly, PWM modulation is used to modulate each LED at the transmitting end, and the modulation frequency of each LED is different. The receiving end uses PD to receive the light signal of the LED, and PD converts the light signal into the received signal strength. The received signal strength will be interfered by system noise and environmental noise. The received signal strength is input into the trained diffusion model for noise reduction. After obtaining the clean received signal strength signal, the fully connected neural network is used for positioning.
[0023] As attached Figure 2 As shown, the diffusion model described in the present invention specifically includes the following steps:
[0024] 1. Visible light receiving signal strength collection
[0025] 1.1. Determine the coverage of a single LED based on the field of view and layout height of a single LED, and then determine the effective positioning space based on the layout and coverage of multiple LEDs. Divide the effective positioning space into multiple positioning cells at intervals of 10 cm, and the center of each cell is used as the collection point for the visible light receiving signal strength. The visible light receiving signal gain H(0) can be shown by the Lambert model:
[0026]
[0027] The value of m determines the directivity of the beam. The larger the value of m, the better the directivity of the beam. Pd represents the effective receiving area of PD, d represents the distance from the receiving end to the LED, and d=||LED i -r Pd ||Given, r Pd represents the location coordinates of the receiving end, Φ 1 / 2 is the power half angle of the LED, φ and ψ represent the irradiation angle and the incident angle respectively, G is the physical device gain, G = T(ψ)g(ψ), T(ψ) is the gain of the filter, and g(ψ) is the gain of the light concentrator.
[0028] 1.2. Design of the transmitter and receiver The positioning system applies PWM modulation to the LED lights in each positioning unit. Different LEDs are distinguished by assigning different frequencies to each LED in the positioning unit based on its spatial position.
[0029] 1.3. Use the PD sensor to collect multiple sets of data for each positioning cell, use the ADC function of the microprocessor to convert the analog signal collected by the PD sensor into a digital signal, and use the serial port assistant to send the converted digital signal to the personal computer (PC).
[0030] 2. Preprocessing of visible light received signal strength.
[0031] 2.1. The interference of visible light indoor positioning is mainly shot noise, thermal noise, background noise and dark current noise. These noises can be simulated by additive Gaussian white noise. The collected data is divided into two groups, one of which is added with additive Gaussian white noise as the noise data set, and the other group remains unchanged as the clean data set. Part of these two data sets is used as training data, and the other part is used as test data to train the diffusion model.
[0032] 3. Training of diffusion model.
[0033] 3.1. Given a sample from the data distribution q(x0), the main purpose of the diffusion model is to learn a model distribution p that is similar to q(x0) θ(x0). In the forward diffusion process, the data is diffused into a good distribution by gradually adding noise, while in the reverse process, the noise is converted into a sample of the target distribution.
[0034] 3.2. Training of diffusion process.
[0035] The diffusion process gradually adds noise to the data to approximate the posterior q(x 1:T |x0), where x1,...,x T is a latent variable with the same dimension as x0. The diffusion process is set as a simple parameterization of a fixed Markov chain with a conditional Gaussian shift at each step:
[0036]
[0037] Among them, β1,...,β T is a variance scheduling. The variance parameters can be fixed or learned through the network. In the present invention, fixed parameters are used. If the variance scheduling performs well, it can ensure that x T At sufficiently large T, it approaches an isotropic Gaussian. N(x; μ, Σ) is a Gaussian pdf with parameters μ and Σ. x t Sampling at any step size t has the closed form where α t :=1-β t and Therefore x t Can be used directly To indicate that
[0038] 3.3. Training of the inverse diffusion process.
[0039] The reverse process learns the inverse diffusion process from x t Recover x0 by sampling pure Gaussian noise p(x T ) starts with The inverse process is defined by the following Markov chain:
[0040]
[0041] Among them, the relevant time parameters of the Gaussian transition are learned. In the setting of the diffusion model, the proposed p θ (x t-1 |x t ) is as follows:
[0042]
[0043]
[0044] Among them, ∈θ (.,.) is a learnable denoising function that estimates the noise vector ∈ added to the noisy input. This parameterization yields the following loss function:
[0045]
[0046] This loss function can be viewed as a weighted combination of denoised score matching, which can achieve more stable training and better results compared to the original score matching loss.
[0047] The denoising process of the trained model is shown in the attached figure. Figure 3 As shown, the noise signal is input into the diffusion model, and the diffusion model will regenerate a clean signal, which can be used for subsequent processing.
[0048] 4. Neural network training and positioning calculation.
[0049] 4.1,Signal preprocessing,The data generated by the diffusion model are processed using fast Fourier transform, and then the obtained frequency domain signal is substituted into CNN for training.
[0050] 4.2. The CNN network structure consists of two convolutional layers, two maximum pooling layers, and two fully connected layers. Each hidden layer in the network uses the rectified linear unit (ReLU) as the activation function. Furthermore, in order to keep the feature map dimension after the convolution operation matching the input signal size, the convolution kernel size is set to N×N, the step size is set to 1, and a padding strategy of size 1 is adopted.
[0051] 4.3. Configure the trained diffusion model and neural network to the microprocessor to achieve online positioning.
[0052] Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the limitations of the claims of the present invention.
Claims
1. A visible light indoor positioning method based on a diffusion model, characterized in that: S1: For the indoor positioning environment to be tested, the ground is divided into N positioning units of uniform size, the LED at the transmitting end is modulated, the PD sensor is used at the receiving end to collect the light signal of the LED, and the microprocessor is used to convert the light signal into a digital signal and send it to the computer for data processing; S2: preprocess the data according to step S1, and use the processed data as a data set to train the diffusion model; S3: training the diffusion model according to the training set in step S2. The training part of the diffusion model can be divided into two steps: diffusion and inverse diffusion. The noise predictor in the model is trained during the diffusion and inverse diffusion process. S4: obtaining a denoised received signal strength value based on the diffusion model of step S3, and obtaining a frequency spectrum of each positioning unit through fast Fourier transform; S5: Establish a mapping relationship between the corresponding relationship between frequency and amplitude in the spectrum graph and its coordinates in the real space, and use a fully connected neural network to train this relationship, where the input of the neural network is the frequency and its corresponding amplitude presented in the form of a sequence signal, and the output is the coordinate; S6: Deploy the diffusion model and neural network on the microprocessor, and display the positioning coordinates calculated by the microprocessor in real time on the screen.
2. The visible light indoor positioning method based on the diffusion model according to claim 1 is characterized in that The training method of the diffusion model in step S3 is: For the training part of the diffusion model, given a sample from the data distribution q(x0), the main purpose of the diffusion model is to learn a model distribution p that is approximate to q(x0) θ (x0); In the forward diffusion process, the data is diffused into a good distribution by gradually adding noise, while in the reverse process, the noise is converted into a sample of the target distribution: 1) Diffusion process training The diffusion process gradually adds noise to the data to approximate the posterior q(x 1:T |x0), where x1,...,x T is a latent variable with the same dimension as x0. The diffusion process is set as a simple parameterization of a fixed Markov chain with a conditional Gaussian shift at each step: Among them, β1,...,β T is a variance scheduling. The variance parameters can be fixed or learned through the network. In this invention, fixed parameters are used. If the variance scheduling performs well, it can ensure that x T At a sufficiently large T, it approaches an isotropic Gaussian; is a Gaussian pdf with parameters μ and Σ; x t Sampling at any step size t has the closed form where α t :=1-β t and Therefore x t Can be used directly To indicate that 2) Training of the inverse diffusion process The reverse process learns the inverse diffusion process from x t Recover x0 by sampling pure Gaussian noise p(x T ) starts with The inverse process is defined by the following Markov chain: Among them, the relevant time parameters of the Gaussian transition are learned; the p θ (x t-1 |x t ) is as follows: Among them, ∈ θ (.,.) is a learnable denoising function that estimates the noise vector ∈ added to the noisy input. This parameterization yields the following loss function: This loss function can be viewed as a weighted combination of denoised score matching, which can achieve more stable training and better results compared to the original score matching loss.