Indoor visible light positioning method and system based on clustering and deep neural network
By combining clustering and deep neural networks in an indoor visible light positioning system, and training the neural network using signal strength data, the problem of insufficient accuracy in indoor visible light positioning was solved, and high-precision indoor positioning was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF SCI & TECH BEIJING
- Filing Date
- 2023-04-10
- Publication Date
- 2026-06-19
Smart Images

Figure CN116466335B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical communication positioning technology, and in particular to an indoor visible light positioning method and system based on clustering and deep neural networks. Background Technology
[0002] Over the past decade, wireless positioning systems have become an indispensable part of our daily lives, with indoor applications demanding increasingly higher levels of positioning services. High-speed indoor positioning, while maintaining accuracy, is fundamental for the application of robots and drones in indoor scenarios. In the field of positioning, the Global Positioning System (GPS) is widely used outdoors. However, GPS is often unusable indoors, as the signal attenuates significantly when passing through solid walls. Currently, various indoor positioning technologies, such as Wi-Fi, Wireless Local Area Network (WLAN), infrared, Radio Frequency Identification (RFID), Zigbee, Ultra-Wideband (UWB), and Bluetooth, have been extensively researched. However, these technologies suffer from limitations such as low accuracy, electromagnetic interference, low security, and congested spectrum resources, preventing their widespread adoption. In contrast to the aforementioned indoor positioning technologies, Visible Light Positioning (VLP) technology has attracted considerable attention due to its low cost, high security, and ability to simultaneously provide lighting, positioning, and communication. Indoor visible light positioning technology is a novel wireless communication technology that combines lighting and communication, is environmentally friendly, and can broaden spectrum resources. Compared with existing indoor positioning technologies, it has many advantages such as no electromagnetic interference, good security and confidentiality, and high positioning accuracy. It is especially suitable for various large venues or electromagnetically sensitive indoor areas, such as hospitals, mines, airplanes, and large shopping malls, so it has broad application and development prospects. Summary of the Invention
[0003] This invention provides an indoor visible light positioning method and system based on a combination of clustering and deep neural networks, which solves the defects and insufficient positioning accuracy of existing indoor visible light positioning systems based on received signal strength.
[0004] To achieve the aforementioned objectives, the present invention provides the following technical solution: an indoor visible light positioning method based on a combination of clustering and deep neural networks, characterized in that the steps include:
[0005] S1. Drive multiple LEDs through the transmitting end processor, allocate frequencies to the multiple LEDs, and transmit periodic signals with allocated frequencies through the multiple LEDs;
[0006] S2. A preset positioning area is set with uniformly distributed grid points. The periodic signal is received in the positioning area by a photodetector. The periodic signal is then imported into a sampling device to obtain signal strength information and buffer it.
[0007] S3. Transmit the cached signal strength information to the receiving end processor;
[0008] S4. The receiving end processor performs a Fast Fourier Transform (FFT) on the signal strength information to obtain the spectrum information; and the peak values of the spectrum near the frequencies of the multiple LEDs are taken as the received signal strength of the corresponding LEDs and recorded as received signal strength data.
[0009] S5. Repeat S2-S4 to obtain M sets of received signal strength data. The M sets of received signal strength data and the actual x-coordinate and y-coordinate values corresponding to each grid point constitute training data for clustering and deep neural networks.
[0010] S6. Clustering and initialization of the deep neural network are performed by the receiving end processor;
[0011] S7. Combine the K-menas algorithm and the DNN algorithm to train the initialized deep neural network and output the trained deep neural network.
[0012] S8. At any grid point to be tested in the positioning area, the photodetector receives the signal sent by the LED, imports it into the sampling device to obtain the mixed signal intensity of N LEDs in the time domain, and then transmits it to the receiving end processor; input the received signal intensity information of each LED into the trained neural network model for testing, and the output value of the test is the position coordinate of the photodetector, thus completing the indoor visible light positioning based on the combination of clustering and deep neural network.
[0013] Preferably, in step S1, the layout requirements for multiple LEDs include:
[0014] The number of LEDs is N, and N is not less than 3. The LEDs are placed on the ceiling. The LED density is determined by the height of the ceiling from the positioning area and the receiving angle of the photodetector, ensuring that the photodetector can receive the same number of LED signals (N) at any position in the positioning area.
[0015] Preferably, in step S1, the condition for frequency allocation for each LED is that the flicker is not visible to the human eye;
[0016] The periodic signal can be either a sine wave periodic signal or a square wave periodic signal, so the visible light positioning system does not need to record the LED position information corresponding to each allocated frequency.
[0017] Among them, the frequency assigned to the flicker that is invisible to the human eye should be greater than 50 Hz.
[0018] Preferably, step S2 includes:
[0019] The photodetector is a photodiode; the sampling device includes an oscilloscope and a data acquisition circuit; the LED signal strength information acquired by the sampling device is the mixed signal strength of N LEDs in the time domain.
[0020] Preferably, in step S5, M sets of received signal strength data are obtained. These M sets of received signal strength data, along with the actual x-coordinate and y-coordinate values corresponding to each grid point, constitute training data for clustering and the deep neural network, including:
[0021] The data obtained are the signal strength data of the LEDs in the M grid points, i.e., the RSS data; the actual x and y coordinate values corresponding to each grid point are the actual coordinate value data, and both the RSS data and the actual coordinate value data are in the M groups.
[0022] The training data includes two-dimensional location information of multiple receivers within a cell region and a set of channel estimation matrix parameters corresponding to the multiple two-dimensional location information.
[0023] Preferably, in step S6, clustering the training data and initializing the deep neural network includes:
[0024] S61. Obtain the RSS data and actual coordinate value data of the output group M from S5;
[0025] S62. Set the number of clusters k, the number of training samples, the number of input layer nodes, the number of hidden layer nodes, the number of output layer nodes, the loss function, the hidden layer activation function, the output layer activation function, the stopping iteration threshold, and the maximum number of iterations;
[0026] S63. Normalize the RSS data and the actual coordinate value data, and use the normalized RSS data as the clustering input data.
[0027] A deep neural network consists of an input layer, hidden layers, and an output layer. Linear operations and activation function operations are performed on each hidden layer.
[0028] Preferably, in step S7, the K-menas algorithm and the DNN algorithm are combined to train the initialized deep neural network, and the trained deep neural network is output, including:
[0029] S71. Select K objects from the normalized RSS data as initial cluster centers, calculate the distance between each object and each seed cluster center, assign each object to the cluster center closest to it, and after achieving coarse positioning in the positioning stage, use a deep neural network to achieve precise positioning and output precise positioning data.
[0030] S72. The precise positioning data is propagated along the deep neural network for the i-th time. The propagation loss function is used to determine the difference between the target value and the predicted value. During forward propagation, the calculation is performed layer by layer from the input layer through the hidden layers until the output layer is reached to obtain the output result. The propagation loss function is used to determine the difference between the target value and the predicted value.
[0031] S73. Determine whether the difference between the target value and the predicted value is less than the stopping iteration threshold. If it is less than or equal to the stopping iteration threshold, output the trained neural network and jump to S8. If not, further determine whether the number of iterations is greater than or equal to the maximum number of iterations. If yes, the neural network training is complete. If not, let i = i + 1, that is, increment the number of iterations by 1, and repeat S71-S73 until the trained neural network is output.
[0032] An indoor visible light positioning system based on a combination of clustering and deep neural networks, the system being used in the aforementioned indoor visible light positioning method based on a combination of clustering and deep neural networks, the system comprising:
[0033] A visible light transmitting module is used to drive multiple LEDs through a transmitting end processor, allocate frequencies to the multiple LEDs, and transmit periodic signals with allocated frequencies through the multiple LEDs;
[0034] The signal receiving module is used for a preset positioning area, where uniformly distributed grid points are set. The periodic signal is received in the positioning area by a photodetector, and the periodic signal is imported into a sampling device to obtain signal strength information and buffer it.
[0035] A signal transmission module is used to transmit the cached signal strength information to the receiving end processor;
[0036] The received signal strength generation module is used to perform a Fast Fourier Transform (FFT) on the signal strength information by the receiving end processor to obtain spectrum information; and to take the spectral peaks near the frequencies of the multiple LEDs as the received signal strength of the corresponding LEDs, and record them as received signal strength data.
[0037] The training data generation module is used to repeatedly execute S2-S4 to obtain M sets of received signal strength data. The M sets of received signal strength data and the actual x-coordinate value and y-coordinate value corresponding to each grid point constitute the training data of the deep neural network.
[0038] A neural network initialization module is used to perform clustering and initialize the deep neural network through the receiving end processor;
[0039] The neural network training module is used to train the initialized deep neural network and output the trained deep neural network.
[0040] The positioning module is used to receive signals sent by LEDs at any grid point to be tested in the positioning area using a photodetector, import the mixed signal intensity of N LEDs in the time domain into a sampling device, and then transmit it to the receiving end processor. The received signal intensity information of each LED is input into the trained neural network for testing, and the output value of the test is the position coordinate of the photodetector, thus completing indoor visible light positioning based on the combination of clustering and deep neural networks.
[0041] Preferably, the signal transmitting module is further configured to accommodate the deployment requirements of multiple LEDs, including:
[0042] The number of LEDs is N, and N is not less than 3. The LEDs are placed on the ceiling. The LED density is determined by the height of the ceiling from the positioning area and the receiving angle of the photodetector, ensuring that the photodetector can receive the same number of LED signals (N) at any position in the positioning area.
[0043] Preferably, the signal transmitting module is further configured to perform frequency allocation for each LED under the condition that the flicker is not visible to the human eye;
[0044] The periodic signal can be either a sine wave periodic signal or a square wave periodic signal, so the visible light positioning system does not need to record the LED position information corresponding to each allocated frequency.
[0045] Among them, the frequency assigned to the flicker that is invisible to the human eye should be greater than 50 Hz.
[0046] On the one hand, an electronic device is provided, the electronic device including a processor and a memory, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to implement the above-mentioned indoor visible light positioning method based on the combination of clustering and deep neural networks.
[0047] On the one hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, the at least one instruction being loaded and executed by a processor to implement the above-described indoor visible light positioning method based on a combination of clustering and deep neural networks. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a schematic diagram of the indoor visible light positioning method based on the combination of clustering and deep neural networks provided in an embodiment of the present invention;
[0050] Figure 2 This is a VLP system architecture diagram of K-means-DNN provided in the embodiments of the present invention;
[0051] Figure 3 This is a diagram of the DNN neural network structure provided in an embodiment of the present invention;
[0052] Figure 4 This is a schematic diagram of a specific indoor scene provided in an embodiment of the present invention;
[0053] Figure 5 This is a block diagram of an indoor visible light positioning system based on a combination of clustering and deep neural networks provided in an embodiment of the present invention;
[0054] Figure 6 This is a detailed diagram of an indoor visible light positioning system based on a combination of clustering and deep neural networks provided in an embodiment of the present invention;
[0055] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0057] This invention addresses the challenges of existing interval uncertainty indicators by providing an indoor visible light positioning method based on a combination of clustering and deep neural networks, which can consider the information of the outermost point set of the dataset and the characteristics of the point set distribution in two-dimensional space.
[0058] like Figure 1As shown, this embodiment of the invention provides an indoor visible light positioning method based on a combination of clustering and deep neural networks, which can be implemented by an electronic device. Figure 1 The flowchart shown is for an indoor visible light positioning method based on a combination of clustering and deep neural networks. The processing flow of this method may include the following steps:
[0059] S101. Drive multiple LEDs through the transmitting end processor, allocate frequencies to the multiple LEDs, and transmit periodic signals with allocated frequencies through the multiple LEDs.
[0060] In one feasible implementation, the arrangement requirements for multiple LEDs in step S101 include:
[0061] The number of LEDs is N, and N is not less than 3. The LEDs are placed on the ceiling. The LED density is determined by the height of the ceiling from the positioning area and the receiving angle of the photodetector, ensuring that the photodetector can receive the same number of LED signals (N) at any position in the positioning area.
[0062] In one feasible implementation, in step S1, the condition that needs to be met for frequency allocation for each LED is that the flicker is not visible to the human eye.
[0063] The periodic signal can be either a sine wave periodic signal or a square wave periodic signal, so the visible light positioning system does not need to record the LED position information corresponding to each allocated frequency.
[0064] Among them, the frequency assigned to the flicker that is invisible to the human eye should be greater than 50 Hz.
[0065] In one feasible implementation, the conditions that need to be met for frequency allocation for each LED in this invention are: the flicker is not visible to the human eye and the different frequencies are not multiples of each other.
[0066] In one feasible implementation, the front end of the high-precision indoor visible light positioning system of the present invention includes two main parts: a visible light transmitting module and a receiving end processing module.
[0067] The visible light transmission module consists of three parts: a transmitter encoder, an LED driver circuit, and an LED array.
[0068] The encoder at the transmitting end can be an FPGA or a microcontroller, used to generate periodic signals of different frequencies sent by each white LED in the LED array. The LED array uses N LEDs.
[0069] Among them, the LED driver circuit provides a suitable DC bias for the LED and loads the AC signal generated by the encoder at the transmitting end onto the LED driving current;
[0070] Each LED sends a periodic signal at a different frequency.
[0071] The receiver processing module consists of three parts: a photodetector, a sampling device, and a receiver processor containing a neural network.
[0072] The photodetector is a photodiode; the sampling device can be an oscilloscope or a data acquisition circuit; the receiving processor containing a neural network performs an FFT on the time-domain signal output by the sampling device to obtain the received signal intensity of white LEDs at different frequencies.
[0073] The connection relationships of the various modules in the positioning system are as follows:
[0074] The transmitting FPGA is connected to the LED driver circuit, which is linked to the LED array. The visible light emitted by the LED array is connected to the photodetector at the receiving end. The photodetector is connected to the sampling device, which is connected to the Raspberry Pi at the receiving end, which contains a neural network.
[0075] The functions of each component module in the positioning system are as follows:
[0076] The function of the transmitting FPGA is to generate periodic signals of different frequencies transmitted by each LED; the function of the LED driving circuit is to provide a suitable DC bias for each LED and load the AC signal generated by the transmitting FPGA onto the LED driving current; the function of the LED is to transmit LED periodic signals of different frequencies; the function of the photodetector is to collect the signal intensity of each white LED in the positioning area and convert the light intensity signal into an electrical signal; the function of the sampling device is to sample the electrical signal output by the photodetector to obtain the mixed signal intensity of each LED in the time domain; the function of the receiving processor is to perform a fast Fourier transform on the time domain signal to obtain the received signal intensity of LEDs of different frequencies, and to use the method described in this invention for indoor visible light positioning.
[0077] S102. A preset positioning area is defined, with uniformly distributed grid points set within the positioning area. A photodetector receives the periodic signal within the positioning area, and the periodic signal is imported into a sampling device to obtain signal strength information and buffer it.
[0078] In one feasible implementation, step S102 includes:
[0079] The photodetector is a photodiode; the sampling device includes an oscilloscope and a data acquisition circuit; the LED signal strength information acquired by the sampling device is the mixed signal strength of N LEDs in the time domain.
[0080] In one feasible implementation, a grid of uniformly distributed points with a spacing of d is set within the positioning area, referred to simply as positioning area grid points;
[0081] The number of grid points in the positioning area is denoted as L.
[0082] S103. The cached signal strength information is transmitted to the receiving end processor.
[0083] In one feasible implementation, the receiving processor is a Raspberry Pi.
[0084] S104. The receiving end processor performs FFT (fast Fourier Transform) on the signal strength information to obtain spectrum information; and takes the spectral peaks near the frequencies of the multiple LEDs as the received signal strength of the corresponding LEDs, and records them as received signal strength data.
[0085] S105. Repeat S2-S4 to obtain M sets of received signal strength data. The M sets of received signal strength data and the actual x-coordinate and y-coordinate values corresponding to each grid point constitute training data for clustering and deep neural networks.
[0086] In one feasible implementation, in step S5, M sets of received signal strength data are obtained. These M sets of received signal strength data, along with the actual x-coordinate and y-coordinate values corresponding to each grid point, constitute the training data for a deep neural network, including:
[0087] The data obtained are the signal strength data of the LEDs in the M grid points, i.e., the RSS data; the actual x and y coordinate values corresponding to each grid point are the actual coordinate value data, and both the RSS data and the actual coordinate value data are in the M groups.
[0088] The training data includes two-dimensional location information of multiple receivers within a cell region and a set of channel estimation matrix parameters corresponding to the multiple two-dimensional location information.
[0089] S106. Clustering and initialization of the deep neural network are performed by the receiving end processor.
[0090] In one feasible implementation, step S6, which involves clustering the training data and initializing the deep neural network, includes:
[0091] S61. Obtain the RSS data and actual coordinate value data of the output group M from S5;
[0092] S62. Set the number of clusters k, the number of training samples, the number of input layer nodes, the number of hidden layer nodes, the number of output layer nodes, the loss function, the hidden layer activation function, the output layer activation function, the stopping iteration threshold, and the maximum number of iterations;
[0093] S63. Normalize the RSS data and the actual coordinate value data, and use the normalized RSS data as the clustering input data.
[0094] A deep neural network consists of an input layer, hidden layers, and an output layer. Linear operations and activation function operations are performed on each hidden layer.
[0095] In one feasible implementation, the RSS data and the actual coordinate value data are normalized, specifically by dividing each row of data by the standard deviation of that row of data.
[0096] The normalized RSS data is a matrix.
[0097] S107. Combine the K-menas algorithm and the DNN algorithm to train the initialized deep neural network and output the trained deep neural network.
[0098] In one feasible implementation, step S107 combines the K-menas algorithm and the DNN algorithm to train the initialized deep neural network and output the trained deep neural network, including:
[0099] S171. Select K objects from the normalized RSS data as initial cluster centers, calculate the distance between each object and each seed cluster center, assign each object to the cluster center closest to it, and after achieving coarse positioning in the positioning stage, use a deep neural network to achieve precise positioning and output precise positioning data.
[0100] S172. The precise positioning data is propagated along the deep neural network for the i-th time. The propagation loss function is used to determine the difference between the target value and the predicted value. During forward propagation, the calculation is performed layer by layer from the input layer through the hidden layers until the output layer is reached to obtain the output result. The propagation loss function is used to determine the difference between the target value and the predicted value.
[0101] S173. Determine whether the difference between the target value and the predicted value is less than the stopping iteration threshold. If it is less than or equal to the stopping iteration threshold, output the trained neural network and jump to S8. If not, further determine whether the number of iterations is greater than or equal to the maximum number of iterations. If yes, the neural network training is complete. If not, let i = i + 1, that is, increment the number of iterations by 1, and repeat S71-S73 until the trained neural network is output.
[0102] In one feasible implementation, the deep neural network training process involves training the x-axis coordinates and y-axis coordinates separately; the following example uses x-axis training.
[0103] S171. The output data propagates along the deep neural network for the i-th time. The linear relationship coefficient w and bias b between each layer are used to calculate the output of the next layer, until the output layer is reached.
[0104] Among them, the linear relationship coefficient w and bias b between each layer are defined. The input layer has no linear relationship coefficient parameter, and the output layer has no bias b parameter.
[0105] S172. Subtract the corresponding data in the M sets of output coordinate values from step 171 from the corresponding data in the M sets of actual coordinate values obtained in step 5, and calculate the sum of squares to obtain the error value. Using the propagation loss function, the difference between the target value and the predicted value can be determined.
[0106] S173. Determine whether the difference between the target value and the predicted value is less than the stopping iteration threshold. If it is less than or equal to the stopping iteration threshold, output the completed neural network and jump to step eight. If not, further determine whether the number of iterations is greater than or equal to the maximum number of iterations. If yes, the neural network training is complete. If not, let i = i + 1, that is, increment the number of iterations by 1, and jump to step 171 to readjust the linear relationship coefficient w and the bias b.
[0107] After completing the training model for the x-axis coordinates, use the same steps to complete the training model for the y-axis coordinates.
[0108] One feasible implementation method is, for example Figure 2 Here is a diagram of the VLP system architecture of K-means-DNN, such as... Figure 3 This is a diagram of the DNN neural network structure. This invention employs a learning algorithm combining K-means and DNN algorithms to train the neural network: specifically, different modulation frequencies are assigned to multiple white LEDs, and a photodetector receives the signals transmitted by the LEDs within a positioning area. The received signal strength of each LED is obtained by performing a Fast Fourier Transform (FFT) on the signals. The neural network is then trained using the received signal strength and the photodetector's position coordinates. Finally, the received signal strength of each LED at any test location is input into the trained neural network to obtain the photodetector's position coordinates.
[0109] S108. At any grid point to be tested in the positioning area, a photodetector receives the signal sent by the LED, imports it into a sampling device to obtain the mixed signal intensity of N LEDs in the time domain, and then transmits it to the receiving end processor; input the received signal intensity information of each LED into the trained neural network for testing, and the output value of the test is the position coordinate of the photodetector, thus completing the indoor visible light positioning based on the combination of clustering and deep neural network.
[0110] In this embodiment of the invention, the core idea is as follows: The grid points on the diagonal of the positioning area are used as the training set of the neural network, and a learning algorithm combining clustering and deep neural networks is used to train the neural network. Specifically, different modulation frequencies are assigned to multiple white LEDs, and a photodetector is used at the grid points on the diagonal of the positioning area to receive the signals sent by the LEDs. A Fast Fourier Transform (FFT) is performed on the signals to obtain the received signal strength of each LED. The received signal strength and the photodetector's position coordinates are then used to train the neural network. The learning algorithm combines clustering and deep neural network algorithms. Finally, the received signal strength of each LED at any grid point to be tested is input into the trained neural network to obtain the position coordinates of the photodetector.
[0111] In embodiments of the present invention, such as Figure 4 As shown, a specific scenario for indoor positioning based on the present invention "Indoor Visible Light Positioning System and Method Based on Clustering and Deep Neural Network Combination" is provided, as shown in the attached figure. Figure 3 As shown. The indoor scene is 100cm x 100cm x 180cm in size, with the positioning area being 100cm x 100cm.
[0112] Three white LED lights are installed on the ceiling and frequency-modulated, with a frequency range of 5000Hz-10000Hz, specifically 5000Hz, 7000Hz and 9000Hz, to send visible light signals vertically downwards.
[0113] A photodiode is placed horizontally in the positioning area below the ceiling; the positioning area is evenly divided into 121 grid points, with a spacing of 10 cm between adjacent grid points; the training set of the neural network consists of all 121 grid points, and the photodiodes are used to receive signal strength information from the LEDs, and the mixed signal strength of the three LEDs is used.
[0114] Repeat the above process 6 times to obtain 6 sets of LED received signal strength data containing 121 grid points on the diagonal of the positioning area, and use them together with the actual x, y coordinate values corresponding to each grid point to form the training data for the neural network.
[0115] The input layer contains 3 nodes, the hidden layer contains 3 hidden layers, and the output layer contains 1 node. The maximum number of iterations is set to 10,000. An algorithm combining clustering and deep neural networks is used to train the neural network, and finally the trained neural network is obtained.
[0116] The received signal strength from each LED at all 121 grid points in the positioning area is obtained and input into the trained neural network. The output coordinate values are the position coordinates of the photodetector.
[0117] The average positioning error of this invention is 0.78 cm; the maximum positioning error is 4.5 cm; and the 80% confidence level error is reduced to 1 cm. In other words, in specific indoor scenarios, an indoor visible light positioning method based on neural networks and received signal strength has been successfully implemented.
[0118] In this embodiment of the invention, K-means clustering can reduce the training time of deep neural networks; the indoor visible light positioning system and method combining clustering and deep neural networks can effectively improve the computation speed and improve the indoor visible light positioning accuracy based on the trained neural network.
[0119] The indoor visible light positioning method described in this invention is not affected by external factors such as differences in LED performance, LED power fluctuations, multipath reflection, and ambient light interference; the system hardware is based on existing indoor lighting facilities and traditional visible light positioning systems, making it simple and easy to implement.
[0120] Figure 5 This is a schematic diagram of an indoor visible light positioning system based on a combination of clustering and deep neural networks according to the present invention. The system 200 is used for the above-mentioned indoor visible light positioning based on a combination of clustering and deep neural networks. The system 200 includes:
[0121] The visible light transmitting module 210 is used to drive multiple LEDs through a transmitting end processor, allocate frequencies to the multiple LEDs, and transmit periodic signals with allocated frequencies through the multiple LEDs;
[0122] The signal receiving module 220 is used for a preset positioning area, where uniformly distributed grid points are set. The periodic signal is received in the positioning area by a photodetector, and the periodic signal is imported into a sampling device to obtain signal strength information and buffer it.
[0123] One feasible implementation method is, for example Figure 6 As shown, the high-precision indoor visible light positioning system of the present invention comprises two main parts: a visible light transmitting module and a receiving end processing module.
[0124] The visible light transmission module consists of three parts: a transmitter encoder, an LED driver circuit, and an LED array.
[0125] The encoder at the transmitting end can be an FPGA or a microcontroller, used to generate periodic signals of different frequencies sent by each white LED in the LED array. The LED array uses N LEDs.
[0126] Among them, the LED driver circuit provides a suitable DC bias for the LED and loads the AC signal generated by the encoder at the transmitting end onto the LED driving current;
[0127] Each LED sends a periodic signal at a different frequency.
[0128] The receiver processing module consists of three parts: a photodetector, a sampling device, and a receiver processor containing a neural network.
[0129] The photodetector is a photodiode; the sampling device can be an oscilloscope or a data acquisition circuit; the receiving processor containing a neural network performs an FFT on the time-domain signal output by the sampling device to obtain the received signal intensity of white LEDs at different frequencies.
[0130] The connection relationships of the various modules in the positioning system are as follows:
[0131] The transmitting FPGA is connected to the LED driver circuit, which is linked to the LED array. The visible light emitted by the LED array is connected to the photodetector at the receiving end. The photodetector is connected to the sampling device, which is connected to the Raspberry Pi at the receiving end, which contains a neural network.
[0132] The functions of each component module in the positioning system are as follows:
[0133] The function of the transmitting FPGA is to generate periodic signals of different frequencies transmitted by each LED; the function of the LED driving circuit is to provide a suitable DC bias for each LED and load the AC signal generated by the transmitting FPGA onto the LED driving current; the function of the LED is to transmit LED periodic signals of different frequencies; the function of the photodetector is to collect the signal intensity of each white LED in the positioning area and convert the light intensity signal into an electrical signal; the function of the sampling device is to sample the electrical signal output by the photodetector to obtain the mixed signal intensity of each LED in the time domain; the function of the receiving processor is to perform a fast Fourier transform on the time domain signal to obtain the received signal intensity of LEDs of different frequencies, and to use the method described in this invention for indoor visible light positioning.
[0134] Signal transmission module 230 is used to transmit the cached signal strength information to the receiving end processor;
[0135] The received signal strength generation module 240 is used to perform a Fast Fourier Transform (FFT) on the signal strength information through the receiver processor to obtain spectrum information; and to take the spectral peaks near the frequencies of the multiple LEDs as the received signal strength of the corresponding LEDs, and record them as received signal strength data.
[0136] The training data generation module 250 is used to repeatedly execute S2-S4 to obtain M sets of received signal strength data. The M sets of received signal strength data and the actual x-coordinate value and y-coordinate value corresponding to each grid point constitute the training data of the deep neural network.
[0137] The neural network initialization module 260 is used to perform clustering and initialize the deep neural network through the receiving end processor.
[0138] The neural network training module 270 is used to train the initialized clustering and deep neural networks and output the trained deep neural network model.
[0139] The positioning module 280 is used to receive signals sent by LEDs at any grid point to be tested in the positioning area using a photodetector, import the mixed signal intensity of N LEDs in the time domain into the sampling device, and then transmit it to the receiving end processor; input the received signal intensity information of each LED into the trained neural network for testing, and the output value of the test is the position coordinate of the photodetector, thus completing indoor visible light positioning based on the combination of clustering and deep neural network.
[0140] Optionally, the visible light transmitting module 210 is further configured to accommodate multiple LEDs, including those required for deployment.
[0141] The number of LEDs is N, and N is not less than 3. The LEDs are placed on the ceiling. The LED density is determined by the height of the ceiling from the positioning area and the receiving angle of the photodetector, ensuring that the photodetector can receive the same number of LED signals (N) at any position in the positioning area.
[0142] Optionally, the visible light transmitting module 210 is further configured to assign a frequency to each LED, provided that the flicker is not visible to the human eye.
[0143] The periodic signal can be either a sine wave periodic signal or a square wave periodic signal, so the visible light positioning system does not need to record the LED position information corresponding to each allocated frequency.
[0144] Among them, the frequency assigned to the flicker that is invisible to the human eye should be greater than 50 Hz.
[0145] Optionally, the signal receiving module 220 is further configured such that the photodetector is a photodiode; the sampling device includes an oscilloscope and a data acquisition circuit; the LED signal strength information acquired by the sampling device is the mixed signal strength of N LEDs in the time domain.
[0146] Optionally, the training data generation module 250 is further used to acquire the data of the received signal strength of the M grid LEDs, i.e., RSS data; the actual x and y coordinate values corresponding to each grid point are the actual coordinate value data, and both the RSS data and the actual coordinate value data are M sets.
[0147] The training data includes two-dimensional location information of multiple receivers within a cell region and a set of channel estimation matrix parameters corresponding to the multiple two-dimensional location information.
[0148] Optionally, the neural network initialization module 260 is further used in S61 to obtain the RSS data and actual coordinate value data of the output M group of S5;
[0149] S62. Set the number of clusters k, the number of training samples, the number of input layer nodes, the number of hidden layer nodes, the number of output layer nodes, the loss function, the hidden layer activation function, the output layer activation function, the stopping iteration threshold, and the maximum number of iterations;
[0150] S63. Normalize the RSS data and the actual coordinate value data, and use the normalized RSS data as the clustering input data.
[0151] A deep neural network consists of an input layer, hidden layers, and an output layer. Linear operations and activation function operations are performed on each hidden layer.
[0152] Optionally, the neural network training module 270 is further used in S71 to select K objects as initial cluster centers from the normalized RSS data, calculate the distance between each object and each seed cluster center, assign each object to the cluster center closest to it, and after achieving coarse positioning in the positioning stage, use a deep neural network to achieve precise positioning and output precise positioning data.
[0153] S72. The precise positioning data is propagated along the deep neural network for the i-th time. The propagation loss function is used to determine the difference between the target value and the predicted value. During forward propagation, the calculation is performed layer by layer from the input layer through the hidden layers until the output layer is reached to obtain the output result. The propagation loss function is used to determine the difference between the target value and the predicted value.
[0154] S73. Determine whether the difference between the target value and the predicted value is less than the stopping iteration threshold. If it is less than or equal to the stopping iteration threshold, output the trained neural network and jump to S8. If not, further determine whether the number of iterations is greater than or equal to the maximum number of iterations. If yes, the neural network training is complete. If not, let i = i + 1, that is, increment the number of iterations by 1, and repeat S71-S73 until the trained neural network is output.
[0155] Figure 7This is a schematic diagram of the structure of an electronic device 300 provided in an embodiment of the present invention. The electronic device 300 can vary considerably due to differences in configuration or performance. It may include one or more central processing units (CPUs) 301 and one or more memories 302. The memories 302 store at least one instruction, which is loaded and executed by the processors 301 to implement the steps of the following method for correcting the dynamic structural interval model of multicell weight overlap:
[0156] S1. Drive multiple LEDs through the transmitting end processor, allocate frequencies to the multiple LEDs, and transmit periodic signals with allocated frequencies through the multiple LEDs;
[0157] S2. A preset positioning area is set with uniformly distributed grid points. The periodic signal is received in the positioning area by a photodetector. The periodic signal is then imported into a sampling device to obtain signal strength information and buffer it.
[0158] S3. Transmit the cached signal strength information to the receiving end processor;
[0159] S4. The receiving end processor performs a Fast Fourier Transform (FFT) on the signal strength information to obtain the spectrum information; and the peak values of the spectrum near the frequencies of the multiple LEDs are taken as the received signal strength of the corresponding LEDs and recorded as received signal strength data.
[0160] S5. Repeat steps S2-S4 to obtain M sets of received signal strength data. The M sets of received signal strength data and the actual x-coordinate and y-coordinate values corresponding to each grid point constitute the training data for the deep neural network.
[0161] S6. Clustering and initialization of the deep neural network are performed by the receiving end processor;
[0162] S7. Combine the K-means algorithm and the DNN algorithm to train the initialized deep neural network and output the trained deep neural network.
[0163] S8. At any grid point to be tested in the positioning area, the photodetector receives the signal sent by the LED, imports it into the sampling device to obtain the mixed signal intensity of N LEDs in the time domain, and then transmits it to the receiving end processor; input the received signal intensity information of each LED into the trained neural network for testing, and the output value of the test is the position coordinate of the photodetector, thus completing the indoor visible light positioning based on clustering and deep neural network.
[0164] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a terminal to perform the aforementioned indoor visible light positioning method based on clustering and deep neural networks. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device.
[0165] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
Claims
1. An indoor visible light positioning method based on clustering and deep neural networks, characterized in that, The method steps include: S1. Drive multiple LEDs through the transmitting end processor, allocate frequencies to the multiple LEDs, and transmit periodic signals with allocated frequencies through the multiple LEDs; S2. A preset positioning area is set with uniformly distributed grid points. The periodic signal is received in the positioning area by a photodetector. The periodic signal is then imported into a sampling device to obtain signal strength information and buffer it. S3. Transmit the cached signal strength information to the receiving end processor; S4. The receiving end processor performs a Fast Fourier Transform (FFT) on the signal strength information to obtain the spectrum information; and the peak values of the spectrum near the frequencies of the multiple LEDs are taken as the received signal strength of the corresponding LEDs and recorded as received signal strength data. S5. Repeat S2-S4 to obtain M sets of received signal strength data. The M sets of received signal strength data and the actual x-coordinate and y-coordinate values corresponding to each grid point constitute training data for clustering and deep neural networks. S6. Clustering and initialization of the deep neural network are performed by the receiving end processor; S7. Combine the K-menas algorithm and the DNN algorithm to train the initialized deep neural network and output the trained clustering and deep neural network models. In step S7, the K-means algorithm and the DNN algorithm are combined to train the initialized deep neural network and output the trained deep neural network model, including: S71. Select K objects from the normalized RSS data as the initial cluster centers. The RSS data is the data of the received signal strength of the LEDs in the M grid points. Calculate the distance between each object and each seed cluster center, assign each object to the cluster center closest to it, and after achieving coarse localization in the localization stage, use a deep neural network to achieve precise localization and output precise localization data. S72. The precise positioning data is propagated along the deep neural network for the i-th time. The propagation loss function is used to determine the difference between the target value and the predicted value. During forward propagation, the calculation is performed layer by layer from the input layer through the hidden layers until the output layer is reached to obtain the output result. The propagation loss function is used to determine the difference between the target value and the predicted value. S73. Determine whether the difference between the target value and the predicted value is less than the stopping iteration threshold. If it is less than or equal to the stopping iteration threshold, output the trained neural network and jump to S8. If not, further determine whether the number of iterations is greater than or equal to the maximum number of iterations. If yes, the neural network training is complete. If not, let i = i + 1, that is, increment the number of iterations by 1, and repeat S71-S73 until the trained neural network is output. S8. At any grid point to be tested in the positioning area, the photodetector receives the signal sent by the LED, imports it into the sampling device to obtain the mixed signal intensity of N LEDs in the time domain, and then transmits it to the receiving end processor; input the received signal intensity information of each LED into the trained model for testing, and the output value of the test is the position coordinate of the photodetector, thus completing the indoor visible light positioning based on the combination of clustering and deep neural network.
2. The method of claim 1, wherein, In step S1, the layout requirements for multiple LEDs include: The number of LEDs is N, and N is not less than 3. The LEDs are placed on the ceiling. The LED density is determined by the height of the ceiling from the positioning area and the receiving angle of the photodetector, ensuring that the photodetector can receive the same number of LED signals (N) at any position in the positioning area.
3. The method of claim 2, wherein, In step S1, the condition for frequency allocation for each LED is that the human eye cannot see the LED flickering. Among them, the periodic signal is a sine wave periodic signal or a square wave periodic signal, so the visible light positioning system does not need to record the LED position information corresponding to each allocated frequency; Among them, the frequency assigned to the flicker that is invisible to the human eye should be greater than 50 Hz.
4. The method according to claim 1, characterized in that, Step S2 includes: The photodetector is a photodiode; the sampling device includes an oscilloscope and a data acquisition circuit; the LED signal strength information acquired by the sampling device is the mixed signal strength of N LEDs in the time domain.
5. The method according to claim 1, characterized in that, In step S5, M sets of received signal strength data are obtained. These M sets of received signal strength data, along with the actual x-coordinate and y-coordinate values corresponding to each grid point, constitute training data for clustering and the deep neural network, including: The data obtained are the signal strength data of the LEDs in the M grid points, i.e., the RSS data; the actual x and y coordinate values corresponding to each grid point are the actual coordinate value data, and both the RSS data and the actual coordinate value data are in the M groups. The training data includes two-dimensional location information of multiple receivers within a cell region and a set of channel estimation matrix parameters corresponding to the multiple two-dimensional location information.
6. The method according to claim 5, characterized in that, In step S6, clustering the training data and initializing the deep neural network include: S61. Obtain the RSS data and actual coordinate value data of the output group M from S5; S62. Set the number of clusters k, the number of training samples, the number of input layer nodes, the number of hidden layer nodes, the number of output layer nodes, the loss function, the hidden layer activation function, the output layer activation function, the stopping iteration threshold, and the maximum number of iterations; S63. Normalize the RSS data and the actual coordinate value data, and use the normalized RSS data as the clustering input data. A deep neural network consists of an input layer, hidden layers, and an output layer. Linear operations and activation function operations are performed on each hidden layer.
7. An indoor visible light positioning system based on clustering and deep neural networks, characterized in that, The system is used in the indoor visible light positioning method based on the combination of clustering and deep neural networks as described in any one of claims 1 to 6, and the system comprises: A visible light transmitting module is used to drive multiple LEDs through a transmitting end processor, allocate frequencies to the multiple LEDs, and transmit periodic signals with allocated frequencies through the multiple LEDs; The signal receiving module is used for a preset positioning area, where uniformly distributed grid points are set. The periodic signal is received in the positioning area by a photodetector, and the periodic signal is imported into a sampling device to obtain signal strength information and buffer it. A signal transmission module is used to transmit the cached signal strength information to the receiving end processor; The received signal strength generation module is used to perform a Fast Fourier Transform (FFT) on the signal strength information by the receiving end processor to obtain spectrum information; and to take the spectral peaks near the frequencies of the multiple LEDs as the received signal strength of the corresponding LEDs, and record them as received signal strength data. The training data generation module is used to repeatedly execute S2-S4 to obtain M sets of received signal strength data. The M sets of received signal strength data and the actual x-coordinate value and y-coordinate value corresponding to each grid point constitute the training data for clustering and deep neural networks. A neural network initialization module is used to perform clustering and initialize the deep neural network through the receiving end processor; The neural network training module is used to train the initialized deep neural network and output the trained deep neural network. The positioning module is used to receive signals sent by LEDs at any grid point to be tested in the positioning area using a photodetector, import the mixed signal intensity of N LEDs in the time domain into a sampling device, and then transmit it to the receiving end processor. The received signal intensity information of each LED is input into the trained neural network for testing, and the output value of the test is the position coordinate of the photodetector, thus completing indoor visible light positioning based on the combination of clustering and deep neural networks.
8. The system of claim 7, wherein, The visible light transmitting module is further configured to accommodate the following requirements for the deployment of multiple LEDs: The number of LEDs is N, and N is not less than 3. The LEDs are placed on the ceiling. The LED density is determined by the height of the ceiling from the positioning area and the receiving angle of the photodetector, ensuring that the photodetector can receive the same number of LED signals (N) at any position in the positioning area.
9. The system of claim 8, wherein, The visible light transmitting module is further configured to assign a frequency to each LED, provided that the flicker is not visible to the human eye. Among them, the periodic signal is a sine wave periodic signal or a square wave periodic signal, so the visible light positioning system does not need to record the LED position information corresponding to each allocated frequency; Among them, the frequency assigned to the flicker that is invisible to the human eye should be greater than 50 Hz.