An indoor positioning method, system, terminal device and storage medium
By combining LED arrays and lenses, and utilizing Hadamard matrix and correlation reconstruction algorithms for indoor positioning, the problems of low positioning accuracy and high configuration difficulty in existing technologies are solved, achieving flexible and high-precision positioning results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-09
- Publication Date
- 2026-03-24
AI Technical Summary
Existing indoor positioning technologies such as RFID, infrared, Bluetooth and WIFI have low positioning accuracy in complex environments and are easily interfered with. Trilateration is difficult to configure in multiple environments and is easily affected by the environment, resulting in unstable positioning accuracy.
LED arrays are used for positioning. A modulation matrix is generated by modulation according to preset matrix rules. Combined with lens focusing, a structured light spot area is formed. Hadamard matrix is used to reduce crosstalk. A preset correlation reconstruction algorithm is used to demodulate the light intensity information and generate a grayscale matrix for positioning.
It enables flexible configuration and high-precision positioning in multiple application scenarios, reduces the complexity of system construction, does not require an offline database, and has a wide range of applications.
Smart Images

Figure CN116027268B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of optoelectronic communication technology, in particular to an indoor positioning method and system, a terminal device and a storage medium. BACKGROUND
[0002] At present, the indoor positioning technology mainly includes RFID (Radio Frequency Identification), infrared technology, Bluetooth, WIFI, etc. The RFID positioning technology uses a radio frequency method to realize non-contact two-way communication and exchange data, so as to realize the identification and positioning of a mobile device. However, the radio frequency signal is greatly affected by obstacles and is easily interfered by other radio frequency signals. The indoor positioning based on infrared technology is realized by installing optical sensors in the room to receive the modulated infrared rays emitted by various mobile devices (infrared IR markers) for positioning. However, the infrared rays can only be transmitted in a line-of-sight manner because the light cannot pass through obstacles, and the infrared rays are easily interfered by other lights and have a short transmission distance, which makes the indoor positioning effect poor. Bluetooth communication is a short-distance and low-power wireless transmission technology. However, the stability of the Bluetooth positioning system is slightly poor in a complex space environment and is greatly interfered by noise signals. The WIFI technology uses a wireless local area network (WLAN) composed of wireless access points (including wireless routers). The WIFI technology is based on and premised on the position information of the network nodes (wireless access points), and uses a combination of empirical tests and signal propagation models to position the mobile devices that have accessed the network. However, the WIFI positioning is prone to errors and is easily interfered by other signals, thereby affecting the accuracy. The energy consumption of the positioner is also high. With the development of visible light communication (VLC) technology, visible light positioning (VLP) as a new positioning technology has become a research hotspot in the field of indoor positioning technology.
[0003] The VLP usually uses an LED light source as a transmitting end. The common indoor VLP method is a trilateration method. The trilateration method realizes positioning by measuring the distance between the lamp and the receiver. However, the trilateration method needs to strictly synchronize the LED lamp signals in the positioning process, which is difficult to realize. In addition, the trilateration method is not conducive to the expansion of multiple environments, which causes high configuration difficulty in multiple scenes and is easily affected by the environment to affect the positioning accuracy. SUMMARY
[0004] In order to improve the configuration flexibility and positioning accuracy of the visible light in multiple application scenarios, the present application provides an indoor positioning method, system, terminal device and storage medium.
[0005] In a first aspect, the present application provides an indoor positioning method, which adopts the following technical solution:
[0006] An indoor positioning method, comprising the following steps:
[0007] An application scenario is acquired.
[0008] According to the positioning requirements of the application scene, the corresponding LED array is acquired;
[0009] According to the preset matrix rule, the LED array is modulated to generate a corresponding modulation matrix;
[0010] The modulation matrix is identified to acquire the illumination sequence corresponding to the LED array;
[0011] According to the illumination sequence, the LED array is driven to generate a corresponding light spot area;
[0012] The light spot area is analyzed to acquire corresponding light intensity information;
[0013] According to a preset correlation reconstruction algorithm, the light intensity information is demodulated to acquire a reconstruction matrix corresponding to the light spot area;
[0014] The reconstruction matrix is normalized, and a corresponding gray matrix is output as a positioning result.
[0015] According to the actual application scene requirements, the appropriate LED array is designed and selected, the preset matrix rule is used as the matrix of the structured light field, the modulation matrix corresponding to the LED array is generated, the specific modulation matrix is identified to acquire the illumination sequence corresponding to the LED array, the LED array is driven through the illumination sequence, the LED array can emit a continuous periodic illumination mode, and the structured light spot area can be formed on the positioning surface of the application scene through the lens focusing. According to the selection of different pixel sizes of the LED in the LED array and the corresponding lens information, different sizes of light spots in the light spot area can be acquired, that is, different positioning accuracies are obtained. The light intensity information of the light spot area is further collected and analyzed, the light intensity information is demodulated and reconstructed according to the preset correlation reconstruction algorithm, the reconstruction matrix indicating the position of the target positioning area is obtained, the values corresponding to the reconstruction matrix are normalized, and then the differences are observed. The normalized matrix is output and displayed to obtain the gray matrix of the positioning result. The size of the light spot is used as the precision measurement index in the application, the size of the light spot is adjusted through the LED device and the lens, the precision can be freely applied between the centimeter level and the millimeter level and lower precision, the positioning recognition of the mixed light area is realized, the system construction complexity is reduced, and the offline database does not need to be constructed in advance. According to different scene and positioning accuracy requirements, the LED array can be freely configured, the application range is wide, and the configuration flexibility and positioning accuracy of the visible light in the multiple application scenes are improved.
[0016] Optionally, the step of modulating the LED array according to the preset matrix rule to generate a corresponding modulation matrix comprises the following steps:
[0017] The preset matrix rule is a Hadamard matrix, and the Hadamard matrix is composed as follows:
[0018]
[0019] wherein H2 is a 2nd order Hadamard matrix, is a 2 k order Hadamard matrix, a high order Hadamard matrix is obtained by combination of a low order Hadamard matrix, and +1 and -1 in the Hadamard matrix represent on and off states of the LED respectively;
[0020] selecting the 2nd row to the 2 k row in the Hadamard matrix as the modulation matrix of the LED array.
[0021] By adopting the technical scheme, since the Hadamard matrix has good orthogonality, the occurrence of crosstalk between corresponding flashing sequences of the LED array can be reduced, and the reconstruction quality is improved.
[0022] Optionally, the step of identifying the modulation matrix and obtaining the illumination sequence corresponding to the LED array comprises the following steps: the LED array comprises m LEDs, and the illumination sequence of the mth LED is L m (n) = H m+1,n (m = 1, 2,..., 2 k -1; n = 1, 2,..., 2 k -1) wherein H m+1,n is the m+1th row and the nth column of the Hadamard matrix.
[0023] According to the illumination sequence of the mth LED, the illumination sequence corresponding to the LED array is obtained as follows:
[0024]
[0025] wherein A n is an illumination pattern of the LED array at time n, and +1 and -1 represent on and off states of the LED respectively.
[0026] By adopting the technical scheme, since each row of the Hadamard matrix can be used as a modulation illumination sequence of one LED pixel, it is convenient to form various typical illumination patterns of the LED array by switching of each LED.
[0027] Optionally, the step of driving the LED array according to the illumination sequence to generate a corresponding light spot area comprises the following steps:
[0028] forming a light spot projection module corresponding to the LED array according to a preset lens;
[0029] According to the light spot projection module, the light from the LED array is imaged onto the positioning surface to form a corresponding light spot area. The light spot areas corresponding to each LED in the LED array can be independent or partially overlap.
[0030] By adopting the above technical solution and combining it with a preset lens, the LED array can be further made to form regional light spots of different sizes, which can be freely applied between centimeter-level and millimeter-level or even lower precision, thus improving the accuracy of positioning.
[0031] Optionally, the step of demodulating the light intensity information according to a preset correlation reconstruction algorithm to obtain the reconstruction matrix corresponding to the light spot region includes the following steps:
[0032] The light intensity information is demodulated according to the preset association reconstruction algorithm to generate the reconstruction matrix indicating the location of the target positioning area. The preset association reconstruction algorithm is as follows:
[0033] P ′ = n S n >- n > n >;
[0034] In the formula A n S represents the illumination pattern of the LED array at time n. n To locate the received signal at time n for the target, P ′ The reconstruction matrix is obtained by the preset association reconstruction algorithm, and <> is the average calculation of N samples.
[0035] By adopting the above technical solution, the light intensity information corresponding to the spot area is demodulated according to the preset association reconstruction algorithm, which eliminates the need to build an offline matching database in advance, effectively reducing the system construction complexity of the current positioning method.
[0036] Optionally, normalizing the reconstructed matrix and outputting the corresponding grayscale matrix as the positioning result includes the following steps:
[0037] Determine the number of highlighted regions within the grayscale matrix;
[0038] If a bright area exists, the target location is determined to be within the sub-spot area corresponding to the bright area, and the sub-spot area is used as the location result;
[0039] If multiple bright areas exist, the target location is determined to be within the overlapping sub-spot area corresponding to the multiple bright areas, and the overlapping sub-spot area is used as the location result.
[0040] By adopting the above technical solution, the number of bright areas in the grayscale matrix is determined, thereby improving the accuracy of target location determination.
[0041] Optionally, driving the LED array according to the lighting sequence to generate the corresponding light spot area includes the following steps:
[0042] The driving method for driving the LED array to emit light according to the lighting sequence can be an FPGA, a microcontroller, or other LED driver chips.
[0043] By adopting the above technical solution, the light emission mode of driving the LED array can be flexibly selected according to actual needs.
[0044] Secondly, this application also provides an indoor positioning system, which adopts the following technical solution:
[0045] An indoor positioning system, comprising:
[0046] The first acquisition module is used to acquire application scenarios;
[0047] The second acquisition module is used to acquire the corresponding LED array according to the positioning requirements of the application scenario;
[0048] The first modulation module is used to modulate the LED array according to a preset matrix rule to generate a corresponding modulation matrix;
[0049] The second modulation module is used to identify the modulation matrix and obtain the lighting sequence corresponding to the LED array;
[0050] The driving module is used to drive the LED array according to the lighting sequence to generate the corresponding light spot area;
[0051] The analysis module is used to analyze the light spot area and obtain the corresponding light intensity information;
[0052] The demodulation module is used to demodulate the light intensity information according to a preset correlation reconstruction algorithm to obtain the reconstruction matrix corresponding to the light spot region;
[0053] The positioning module is used to normalize the reconstructed matrix and output the corresponding grayscale matrix as the positioning result.
[0054] By adopting the above technical solution, a suitable LED array is designed and selected based on the actual application scenario requirements obtained by the second acquisition module. Then, the first modulation module generates the modulation matrix corresponding to the LED array according to the preset matrix rules as the matrix for modulating the structured light field. The second modulation module identifies the specific modulation matrix to obtain the illumination sequence corresponding to the LED array. Subsequently, the driving module drives the LED array according to the above illumination sequence, so that the LED array can emit a continuous periodic illumination mode. Combined with lens focusing, a structured light spot area can be formed on the positioning surface of the application scenario. Among them, by selecting different pixel sizes of LEDs in the LED array and corresponding lens information, light spots of different sizes can be obtained in the light spot area, that is, different positioning accuracies can be obtained. Furthermore, the light intensity information of the light spot area is analyzed by the analysis module. The light intensity information is demodulated and reconstructed by the demodulation module according to a preset correlation reconstruction algorithm to obtain a reconstruction matrix indicating the location of the target area. Then, the values corresponding to the reconstruction matrix are normalized to facilitate the observation of differences. The grayscale matrix of the positioning result is obtained by outputting and displaying the normalized matrix through the positioning module. This application uses the light spot size as an accuracy measurement index. The light spot size can be adjusted by LED devices and lenses, and can be freely applied between centimeter-level, millimeter-level and lower accuracy. It realizes the positioning and recognition of mixed light areas without strict light spot independence, reducing the system construction complexity. Moreover, this solution does not require the pre-construction of an offline database. The LED array can be freely configured according to different scenarios and positioning accuracy requirements, with a wide range of applications, thereby improving the flexibility of visible light configuration and positioning accuracy in multiple application scenarios.
[0055] Thirdly, this application provides a terminal device, which adopts the following technical solution:
[0056] A terminal device includes a memory and a processor, wherein the processor loads and executes a computer program using the aforementioned indoor positioning method.
[0057] By adopting the above technical solution, a computer program is generated from the above indoor positioning method and stored in a memory for loading and execution by a processor. Thus, a terminal device is made based on the memory and processor for convenient use.
[0058] Fourthly, this application provides a computer-readable storage medium, which adopts the following technical solution:
[0059] A computer-readable storage medium storing a computer program, wherein the computer program, when loaded and executed by a processor, employs the aforementioned indoor positioning method.
[0060] By adopting the above technical solution, a computer program is generated from the above indoor positioning method and stored in a computer-readable storage medium for loading and execution by a processor. The computer-readable storage medium facilitates the reading and storage of the computer program.
[0061] In summary, this application includes the following beneficial technical effects: Based on the actual application scenario requirements, a suitable LED array is designed and selected. A preset matrix rule is used as the matrix for modulating the structured light field, generating a modulation matrix corresponding to the LED array. This specific modulation matrix is then identified to obtain the illumination sequence corresponding to the LED array. This illumination sequence drives the LED array, enabling it to emit a continuous periodic illumination pattern. Combined with lens focusing, a structured light spot area can be formed on the positioning surface of the application scenario. Furthermore, by selecting different pixel sizes of the LEDs in the LED array and the corresponding lens information, light spots of different sizes can be obtained in the light spot area, resulting in different positioning accuracies. The light intensity information of the light spot area is further collected and analyzed, and based on a preset... The joint reconstruction algorithm demodulates and reconstructs the light intensity information to obtain a reconstruction matrix indicating the location of the target area. Then, the values corresponding to the reconstruction matrix are normalized to facilitate the observation of differences. The normalized matrix is output and displayed to obtain the grayscale matrix of the positioning result. This application uses the spot size as an accuracy measurement index. The spot size can be adjusted by LED devices and lenses, and can be freely applied between centimeter-level, millimeter-level and lower accuracy. It realizes the positioning and recognition of mixed light areas without strict spot independence, reducing the system construction complexity. Moreover, this solution does not require the pre-construction of an offline database. The LED array can be freely configured according to different scenarios and positioning accuracy requirements, making it widely applicable and thus improving the positioning accuracy of visible light in multiple application scenarios. Attached Figure Description
[0062] Figure 1 This is a flowchart illustrating steps S101 to S108 of an indoor positioning method according to this application.
[0063] Figure 2 This is a flowchart of a positioning system for an indoor positioning method according to this application;
[0064] Figure 3 This is a diagram of a positioning experimental apparatus for an indoor positioning method according to this application;
[0065] Figure 4 This is a flowchart illustrating steps S201 to S202 in an indoor positioning method according to this application.
[0066] Figure 5 This is a flowchart illustrating steps S301 to S302 in an indoor positioning method according to this application.
[0067] Figure 6This application describes an LED array lighting pattern for an indoor positioning method.
[0068] Figure 7 This is a flowchart illustrating steps S401 to S402 in an indoor positioning method according to this application.
[0069] Figure 8 This is a flowchart illustrating step S501 in an indoor positioning method according to this application.
[0070] Figure 9 This is a flowchart illustrating steps S601 to S603 in an indoor positioning method according to this application.
[0071] Figure 10 This is a positioning result diagram of the light spot discrete method of the indoor positioning method of this application;
[0072] Figure 11 This is a positioning result diagram showing the overlapping of light spots in an indoor positioning method according to this application;
[0073] Figure 12 This is a schematic diagram of an indoor positioning system according to this application.
[0074] Explanation of reference numerals in the attached figures:
[0075] 1. First acquisition module; 2. Second acquisition module; 3. First modulation module; 4. Second modulation module; 5. Driving module; 6. Parsing module; 7. Demodulation module; 8. Positioning module. Detailed Implementation
[0076] The following is in conjunction with the appendix Figures 1-12 This application will be described in further detail.
[0077] This application discloses an indoor positioning method, referring to... Figure 1 This includes the following steps:
[0078] S101. Obtain the application scenario;
[0079] S102. Obtain the corresponding LED array according to the positioning requirements of the application scenario;
[0080] S103. Modulate the LED array according to the preset matrix rules to generate the corresponding modulation matrix;
[0081] S104. Identify the modulation matrix and obtain the lighting sequence corresponding to the LED array;
[0082] S105. Drive the LED array according to the lighting sequence to generate the corresponding light spot area;
[0083] S106. Analyze the light spot area and obtain the corresponding light intensity information;
[0084] S107. Demodulate the light intensity information according to the preset correlation reconstruction algorithm to obtain the reconstruction matrix corresponding to the light spot area;
[0085] S108. Normalize the reconstruction matrix and output the corresponding grayscale matrix as the positioning result.
[0086] The application scenarios in step S101 refer to scenarios where visible light positioning technology is applied, such as large areas like underground parking lots, supermarkets, and libraries, and can also be applied to other fields such as precision manufacturing workshops.
[0087] Furthermore, based on the positioning requirements of the current application scenario, a corresponding LED array is obtained. These positioning requirements can include positioning accuracy, positioning distance, etc., and a suitable LED array is designed and selected. For example, if the positioning scenario is a 6 cm × 6 cm positioning area and the positioning accuracy requirement is 1 cm, then square LED beads are selected to form an LED array with a pixel size of 6 × 6. Each LED only needs to project an illumination spot with a side length of 1 cm to cover the entire 6 cm × 6 cm positioning area, thus meeting the positioning requirements.
[0088] In this embodiment, the LED size is not limited to traditional LEDs, but can also be mini-LEDs or micro-LEDs with a size of less than 100μm, ranging from 2mm to 2μm. Different sizes and models of LEDs can be selected according to different application scenarios. The LEDs can be white light or monochromatic light, with wavelengths ranging from 380 to 780nm, and the number of LED pixels used ranges from 1 to 10,000.
[0089] The preset matrix rule is an orthogonal basis – Hadamard matrix. Because the Hadamard matrix has good orthogonality (each row / column is orthogonal), it can reduce crosstalk between the corresponding lighting pattern sequences of the LED array. The modulation matrix corresponding to the LED array is formed using the orthogonal Hadamard matrix. The number of LED array pixels and the dimensions of the Hadamard matrix can be adjusted for positioning accuracy according to different scenarios and positioning requirements, thereby obtaining the corresponding lighting sequence. Using visible light and the Hadamard matrix, the required Hadamard matrix is encoded by PC software to drive the LED array to emit the corresponding periodic lighting pattern, forming the corresponding light spot area on the positioning surface corresponding to the application scenario.
[0090] For example, a 6×6 array of ordinary commercial 3mm white LED beads is designed and soldered, with an LED pixel pitch of 5mm. A 64×64-dimensional Hadamard matrix is used accordingly. Each row of the Hadamard matrix can be used as an LED illumination sequence. The duration of the modulation illumination sequence corresponds to the order of the Hadamard matrix. The LED driving mode is further configured using Vivado software on a computer and written into the PFGA to drive the LED array. The light signal frequency corresponding to the LED array is set to 100KHz, which is much higher than the flicker frequency that the human eye can perceive.
[0091] In this method, a single lens can be placed between the LED array and the positioning surface. Adjusting the lens distance allows for the adjustment of lens-related parameters, further controlling the size of the light spot illuminated on the positioning surface by the LED array. Alternatively, different sizes of light spots can be obtained by selecting LED chips and lens groups of different sizes, thus achieving different positioning accuracies. For example, placing a single Fresnel lens between the LED array and the positioning surface, and adjusting the lens position to make each illumination spot independent, results in a spot diameter of approximately 8 millimeters.
[0092] Furthermore, the LED array is driven by a Hadamard matrix, enabling it to emit 64 lighting modes. Three completely dark modes corresponding to the lighting modes are then set before each lighting mode, thus forming a full-cycle lighting pattern for the LED array. The three completely dark modes serve as the data header in this example. The data header used in this example is not limited to adding completely dark modes before / after the lighting modes; it can also be a flashing pattern of different lengths / frequency.
[0093] The lighting mode is characterized by using rows 2 to 37 of a 64th-order Hadamard matrix to drive a 6×6 LED array. The driving method can be FPGA single-point driving. PFGA stands for Field Programmable Gate Array, which is a semiconductor device containing programmable elements that can be programmed by the user. The LED driving method used in this embodiment can be FPGA, microcontroller, or other LED driver chips. A dedicated boost chip can also be added to adjust the LED luminous intensity.
[0094] For example, using ordinary 3mm white LED beads, a 6×6 matrix is designed and soldered. A 64th-order Hadamard matrix is used as the modulation light illumination mode. The Hadamard matrix is programmed using Vivado software in the computer to control the PFGA to drive the LED array, resulting in a total of 64 illumination modes. A full dark mode with the same 3 cycles is inserted as the data header, so there are 67 illumination modes in each illumination cycle.
[0095] Using a 100kHz driving frequency, the flicker time per cycle in the modulation periodic mode is 0.67ms, which is much larger than the flicker range perceived by the human eye. The algorithm achieves sub-millisecond positioning. The specific calculation method is the number of illumination modes divided by the driving frequency. If the driving frequency is increased, the flicker time can be further reduced.
[0096] Based on the orthogonality of the Hadamard matrix, crosstalk between LED pattern sequences can be reduced, thereby improving positioning accuracy.
[0097] Furthermore, such as Figure 2 and Figure 3 The diagrams shown are a flowchart of the positioning system and a diagram of the positioning experimental device of this application. The light intensity detection device is placed in an arbitrary light spot area to collect and analyze the corresponding light intensity information. The light intensity detector continuously receives the light intensity information of its location. The signal acquisition module samples and stores the light intensity information through an oscilloscope. Then, the stored light intensity information is imported into the data processing module for demodulation. Through the correlation reconstruction algorithm, a reconstruction matrix indicating the location information of the area where the light intensity detector is located is obtained. Then, the values corresponding to the obtained reconstruction matrix are normalized. The normalized matrix is output and displayed to obtain the grayscale matrix that displays the positioning result.
[0098] The indoor positioning method provided in this embodiment designs and selects a suitable LED array according to the actual application scenario requirements. A preset matrix rule is used as the matrix for modulating the structured light field to generate a modulation matrix corresponding to the LED array. This specific modulation matrix is then identified to obtain the lighting sequence corresponding to the LED array. This lighting sequence drives the LED array, enabling it to emit a continuous periodic lighting pattern. Combined with lens focusing, a structured light spot area can be formed on the positioning surface of the application scenario. By selecting different pixel sizes of the LEDs in the LED array and the corresponding lens information, light spots of different sizes can be obtained in the light spot area, resulting in different positioning accuracies. Furthermore, the light intensity information of the light spot area is collected and analyzed, and based on a preset correlation... The algorithm demodulates and reconstructs the light intensity information to obtain a reconstruction matrix indicating the location of the target area. Then, the values corresponding to the reconstruction matrix are normalized to facilitate the observation of differences. The normalized matrix is output and displayed to obtain the grayscale matrix of the positioning result. This application uses the spot size as an accuracy measurement index. The spot size can be adjusted by LED devices and lenses, and can be freely applied between centimeter-level, millimeter-level and lower accuracy. It realizes the positioning and recognition of mixed light areas without strict spot independence, reducing the system construction complexity. Moreover, this solution does not require the pre-construction of an offline database. The LED array can be freely configured according to different scenarios and positioning accuracy requirements, making it widely applicable and thus improving the positioning accuracy of visible light in multiple application scenarios.
[0099] In one embodiment of this example, such as Figure 4As shown, step S103, which modulates the LED array according to the preset matrix rules and generates the corresponding modulation matrix, includes the following steps:
[0100] S201. The preset matrix rule is the Hadamard matrix, and the structure of the Hadamard matrix is as follows:
[0101]
[0102] Where H2 is a 2nd order Hadamard matrix, 2 k A higher-order Hadamard matrix is obtained by combining a lower-order Hadamard matrix. In the Hadamard matrix, +1 and -1 represent the on and off states of the LED, respectively.
[0103] S202, Select the second row to the second line of the Hadamard matrix. k The line serves as the modulation matrix for the LED array.
[0104] In practical applications, the modulation matrix is chosen to be the Hadamard matrix. The Hadamard matrix is a square matrix composed of +1 and -1, and each row / column is orthogonal, exhibiting good orthogonality.
[0105] Since the first row / column elements of any order Hadamard matrix are all 1, they lack eigenvalues. Therefore, the elements in the second row to the second column of the Hadamard matrix are all 1. k The rows can be used as modulation matrices, therefore 2 k A Hadamard matrix of order 2 can modulate up to 2 k -1 pixel LED array.
[0106] For example, if an LED array with 36 pixels is modulated, the order of the Hadamard matrix is 2. k >36, meaning the minimum order of the Hadamard matrix is 64, the second to the 37th row of the Hadamard matrix can be selected as the sequence of the modulation matrix.
[0107] The indoor positioning method provided in this embodiment can reduce crosstalk between corresponding flashing sequences of LED arrays and improve reconstruction quality because the Hadamard matrix has good orthogonality.
[0108] In one embodiment of this example, such as Figure 5 As shown, step S104, which involves identifying the modulation matrix and obtaining the lighting sequence corresponding to the LED array, includes the following steps:
[0109] S301, The LED array includes m LEDs, where the lighting sequence of the m-th LED is L. m (n)=H m+1,n (m = 1, 2, ..., 2) K -1; n = 1, 2, ..., 2K ), where H m+1,n The (m+1)th row and nth column of the Hadamard matrix;
[0110] S302. Based on the lighting sequence of the m LEDs, obtain the lighting sequence corresponding to the LED array as follows:
[0111]
[0112] Among them, A n Let be the illumination pattern of the LED array at time n, where +1 and -1 represent the on and off states of the LEDs, respectively.
[0113] In practical applications, as can be seen from the above, H m+1,n The position is the (m+1)th row and nth column of the Hadamard matrix. Therefore, the length of the lighting sequence for each LED in one cycle is 64, which is the same as the order of the Hadamard matrix. The switching of each LED forms the lighting pattern of the LED array. The LED array has a total of 64 lighting patterns, such as... Figure 6 The image shows LED array lighting patterns, specifically four typical lighting patterns out of 64 lighting patterns.
[0114] The indoor positioning method provided in this embodiment facilitates the creation of various typical lighting patterns for LED arrays by using each row of the Hadamard matrix as a lighting sequence that modulates an LED pixel.
[0115] In one embodiment of this example, such as Figure 7 As shown, S105, which drives the LED array according to the lighting sequence to generate the corresponding light spot area, includes the following steps:
[0116] S401. Based on the preset lens, form a light spot projection module corresponding to the LED array;
[0117] S402. According to the light spot projection module, the light of the LED array is imaged onto the positioning surface to form a corresponding light spot area. The light spot areas corresponding to each LED in the LED array can be independent or partially overlap.
[0118] In practical applications, the preset lens can be set as a Fresnel lens. A single Fresnel lens is placed between the LED array and the positioning surface. Adjusting the lens position allows each illumination spot to be independent. The LED array, combined with the relevant lenses, can form a structured illumination spot on the positioning surface, where each LED corresponds to a spot.
[0119] For example, a suitable lens can be selected based on the positioning accuracy and distance requirements of the actual application scenario. A single Fresnel lens can be placed between the LED array and the positioning surface. The lens distance parameter can be adjusted so that the diameter of each illumination spot is about 1 cm, resulting in an illumination area of 6×6 cm. If the area of the light spot formed by the light-emitting surface of the LED chip meets the positioning requirements, the lens group can be omitted to focus the light spot and further form independent or partially overlapping area light spots of different sizes. This allows for free application between centimeter-level and millimeter-level or even lower precision.
[0120] The characteristics of the light spot area are designed and implemented based on factors such as LED pixel size, pixel pitch, illumination distance, and lens focal length, taking into account the required light spot size and positioning accuracy. Using an LED array combined with lens focusing and other related parameters, the light spot size, i.e., the positioning accuracy, can be controlled by changing the LED pixel size and pitch in conjunction with the lens focal length. Combined with lens focusing, a structured lighting spot can be formed on the positioning surface. Furthermore, different sizes of light spots, i.e., different positioning accuracies, can be obtained by selecting LED chips of different sizes and lens groups. In high-precision scenarios such as smart factories requiring millimeter-level or even μm-level accuracy, mini-LEDs or micro-LED chips with a size of less than 100μm and higher-quality lens groups can be selected. This indoor visible light positioning technology, with controllable accuracy and easy expansion to multiple scenarios, can meet the positioning needs of various scenarios and is simple to implement and easy to expand.
[0121] By combining different light-emitting devices, namely LED arrays and lenses, light spots of different sizes can be formed, achieving positioning accuracy from cm to mm or even higher. LEDs of different sizes can be used in different application scenarios. Compared with traditional LEDs, micro-LEDs with a size of less than 100μm are smaller in size, which is conducive to focusing, have a small divergence angle, and emit light uniformly. The size of the light spot is used as a precision measurement indicator. The size of the light spot can be controlled by the target lens parameters, thus achieving controllable precision.
[0122] The indoor positioning method provided in this embodiment, combined with a preset lens, can further enable the LED array to form regional light spots of different sizes, thereby allowing it to be freely applied between centimeter-level and millimeter-level precision or even lower precision, thus improving the accuracy of positioning.
[0123] In one embodiment of this example, such as Figure 8 As shown, S107, which involves demodulating the light intensity information according to a preset correlation reconstruction algorithm to obtain the reconstruction matrix corresponding to the light spot region, includes the following steps:
[0124] S501. Demodulate the light intensity information according to the preset correlation reconstruction algorithm to generate a reconstruction matrix indicating the location of the target's positioning area. The preset correlation reconstruction algorithm is as follows:
[0125] P ′ = n S n >- n > n >;
[0126] In the formula A n S represents the illumination pattern of the LED array at time n. n To locate the received signal at time n for the target, P ′ is the reconstruction matrix obtained by the preset correlation reconstruction algorithm, and <> is the average calculation of N samples.
[0127] In practical applications, target positioning can be set up as a light intensity detector. The light intensity detector continuously receives the light intensity information of its location, which is then sampled and stored by a signal acquisition module such as an oscilloscope. The stored light intensity information is then imported into the data processing module for demodulation. Based on a preset correlation reconstruction algorithm, a reconstruction matrix indicating the location information of the light intensity detector is obtained through demodulation calculation.
[0128] In optical fiber sensors, the modulation process involves superimposing informational signals onto a carrier light wave; the device that performs this process is called a modulator. In fiber optic sensors, the demodulation process typically converts the signal carried by the carrier light into changes in light intensity, which are then detected by a photodetector. In fiber optic sensors, intensity modulation is achieved by the measured object causing a change in the carrier light intensity, thus enabling the detection of the measured object. While changes in light intensity can be directly detected by a photodetector, the demodulation process primarily considers whether the signal-to-noise ratio meets the measurement accuracy requirements.
[0129] Furthermore, the light intensity detector is placed in any light spot area to collect light intensity information. The receiving end uses a PD photodetector to receive the light intensity information. The oscilloscope reads and saves the light intensity signal. Then, the light intensity data stored in the oscilloscope is imported into a PC for demodulation. The light intensity detector can also be directly connected to an analog-to-digital converter and then imported into an FPGA for demodulation. The target area location information indicating the area where the detector is located within the target positioning area can be obtained, thus determining the positioning location and realizing the positioning of the light intensity detector.
[0130] Since each LED corresponds to a light spot, the light spots formed by the LED array constitute the entire light spot area. The target positioning area refers to the specific location information area within the light spot area that needs to be determined for positioning. Further, the light spot area within the target positioning area is obtained as the light intensity information to be analyzed.
[0131] The indoor positioning method provided in this embodiment demodulates the light intensity information corresponding to the light spot area according to a preset association reconstruction algorithm, which does not require the pre-construction of an offline matching database and effectively reduces the system construction complexity of current positioning methods.
[0132] In one embodiment of this example, such as Figure 9 As shown, step S108, which is the normalization and reconstruction matrix, outputs the corresponding grayscale matrix as the localization result, including the following steps:
[0133] S601. Determine the number of highlighted regions within the grayscale matrix;
[0134] S602. If there is a bright area, the target location is determined to be within the sub-spot area corresponding to the bright area, and the sub-spot area is used as the location result.
[0135] S603. If there are multiple bright areas, the target location is determined to be within the overlapping sub-spot area corresponding to the multiple bright areas, and the overlapping sub-spot area is taken as the location result.
[0136] In practical applications, the values corresponding to the reconstructed matrix obtained above are normalized to facilitate observation of the differences. The normalized matrix is then output and displayed to obtain the grayscale matrix of the positioning result. In the displayed grayscale matrix, if only one area is in a bright state, that is, there is a bright area, then the positioning result can be determined that the light intensity detector is located within the light spot of that area. If the grayscale matrix has multiple bright areas, that is, there are multiple bright areas, then the positioning result can be determined that the light intensity detector is located within the overlapping position of the light spots corresponding to the multiple bright areas.
[0137] like Figure 10 and Figure 11 As shown, where Figure 10 Positioning results of discrete light spots. Figure 11 The image shows the positioning results of overlapping light spots, such as... Figure 10 and Figure 11 In the diagram, 'a' represents the illumination spot image, and 'X' in the illumination spot image represents the target location, i.e., the position of the light intensity detector. 'b' represents the grayscale image of the reconstruction matrix normalized from 0 to 255. After obtaining the reconstruction matrix, it is normalized from 0 to 255 to obtain the grayscale matrix for displaying the positioning result. The dimension of the positioning result image is 6×6, corresponding to a 6×6 LED array.
[0138] For example, by Figure 11 From 'a', we can determine that there are multiple bright areas in the grayscale matrix. If X is located within multiple bright areas, we can determine that the light intensity detector is located within the overlapping position of the light spots corresponding to the multiple bright areas.
[0139] The indoor positioning method provided in this embodiment determines the number of highlighted areas within the grayscale matrix, thereby improving the accuracy of target location determination.
[0140] The first acquisition module 1 is used to acquire application scenarios;
[0141] The second acquisition module 2 is used to acquire the corresponding LED array according to the positioning requirements of the application scenario;
[0142] The first modulation module 3 is used to modulate the LED array according to a preset matrix rule and generate a corresponding modulation matrix.
[0143] The second modulation module 4 is used to identify the modulation matrix and obtain the lighting sequence corresponding to the LED array.
[0144] The driving module 5 is used to drive the LED array according to the lighting sequence to generate the corresponding light spot area;
[0145] Analysis module 6 is used to analyze the light spot area and obtain the corresponding light intensity information;
[0146] The demodulation module 7 is used to demodulate the light intensity information according to the preset correlation reconstruction algorithm and obtain the reconstruction matrix corresponding to the light spot area; the positioning module 8 is used to normalize the reconstruction matrix and output the corresponding grayscale matrix as the positioning result.
[0147] The indoor positioning system provided in this embodiment designs and selects a suitable LED array based on the actual application scenario requirements obtained by the second acquisition module 2. Then, the first modulation module 3 generates a modulation matrix corresponding to the LED array according to a preset matrix rule as the matrix for modulating the structured light field. The second modulation module 4 identifies the specific modulation matrix to obtain the lighting sequence corresponding to the LED array. Subsequently, the driving module 5 drives the LED array according to the above lighting sequence, so that the LED array can emit a continuous periodic lighting pattern. Combined with lens focusing, a structured light spot area can be formed on the positioning surface of the application scenario. Different sizes of light spots in the light spot area can be obtained by selecting different pixel sizes of LEDs in the LED array and corresponding lens information, that is, different positioning accuracies can be obtained. The light spot area is further analyzed by the analysis module 6. The light intensity information is demodulated and reconstructed by the demodulation module 7 according to a preset correlation reconstruction algorithm to obtain a reconstruction matrix indicating the location of the target positioning area. Then, the values corresponding to the reconstruction matrix are normalized to facilitate the observation of differences. The normalized matrix is output and displayed by the positioning module 8 to obtain the grayscale matrix of the positioning result. This application uses the light spot size as an accuracy measurement index. The light spot size can be adjusted by LED devices and lenses, and can be freely applied between centimeter-level, millimeter-level and lower accuracy. It realizes the positioning and recognition of mixed light areas without strict light spot independence, reducing the system construction complexity. Moreover, this solution does not require the pre-construction of an offline database. The LED array can be freely configured according to different scenarios and positioning accuracy requirements, with a wide range of applications, thereby improving the flexibility of visible light configuration and positioning accuracy in multiple application scenarios.
[0148] It should be noted that the indoor positioning system provided in this application embodiment also includes each module and / or corresponding sub-module corresponding to the logical function or logical step of any of the above-mentioned indoor positioning methods, to achieve the same effect as each logical function or logical step, which will not be elaborated here.
[0149] This application also discloses a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program using any of the indoor positioning methods described in the above embodiments.
[0150] The terminal device can be a computer device such as a desktop computer, a laptop computer, or a cloud server. The terminal device includes, but is not limited to, a processor and a memory. For example, the terminal device may also include input / output devices, network access devices, and buses.
[0151] The processor can be a central processing unit (CPU). Of course, depending on the actual use, it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc., and this application does not limit it in this regard.
[0152] The memory can be an internal storage unit of the terminal device, such as a hard disk or RAM of the terminal device, or an external storage device of the terminal device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD), or flash memory card (FC) equipped on the terminal device. Furthermore, the memory can be a combination of internal storage units and external storage devices of the terminal device. The memory is used to store computer programs and other programs and data required by the terminal device. The memory can also be used to temporarily store data that has been output or will be output. This application does not limit this.
[0153] In this terminal device, any one of the indoor positioning methods in the above embodiments can be stored in the memory of the terminal device and loaded and executed on the processor of the terminal device for convenient use.
[0154] This application also discloses a computer-readable storage medium, which stores a computer program, wherein when the computer program is executed by a processor, it employs any of the indoor positioning methods described in the above embodiments.
[0155] The computer program can be stored in a computer-readable medium. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or certain middleware. The computer-readable medium includes any entity or device capable of carrying computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the computer-readable medium includes, but is not limited to, the above-mentioned components.
[0156] In this embodiment, any one of the indoor positioning methods described above can be stored in the computer-readable storage medium and loaded and executed on the processor to facilitate the storage and application of the above methods.
[0157] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.
Claims
1. An indoor positioning method, characterized in that, Includes the following steps: Obtain application scenarios; Based on the positioning requirements of the application scenario, obtain the corresponding LED array; The LED array is modulated according to a preset matrix rule to generate a corresponding modulation matrix; The step of modulating the LED array according to a preset matrix rule to generate a corresponding modulation matrix includes the following steps: The preset matrix rule is the Hadamard matrix, and the structure of the Hadamard matrix is as follows: Where H2 is a 2nd order Hadamard matrix, 2 k A higher-order Hadamard matrix is obtained by combining a lower-order Hadamard matrix. In the Hadamard matrix, +1 and -1 represent the on and off states of the LED, respectively. Select the second row to the second row of the Hadamard matrix. k The row serves as the modulation matrix of the LED array; Identify the modulation matrix to obtain the lighting sequence corresponding to the LED array; The LED array is driven according to the lighting sequence to generate a corresponding light spot area; The step of driving the LED array according to the lighting sequence to generate the corresponding light spot area includes the following steps: Based on the preset lens, a light spot projection module corresponding to the LED array is formed; According to the light spot projection module, the light of the LED array is imaged onto the positioning surface to form a corresponding light spot area. The light spot areas corresponding to each LED in the LED array can be independent or partially overlap. Analyze the light spot area to obtain the corresponding light intensity information; The light intensity information is demodulated according to a preset correlation reconstruction algorithm to obtain the reconstruction matrix corresponding to the light spot region; The step of demodulating the light intensity information according to a preset correlation reconstruction algorithm to obtain the reconstruction matrix corresponding to the light spot region includes the following steps: The light intensity information is demodulated according to the preset association reconstruction algorithm to generate the reconstruction matrix indicating the location of the target positioning area. The preset association reconstruction algorithm is as follows: P'=<A n S n >-<A n ><S n >; In the formula A n S represents the illumination pattern of the LED array at time n. n The received signal at time n is used to locate the target, P' is the reconstruction matrix obtained by the preset association reconstruction algorithm, and <> is the average calculation of N samples; The reconstructed matrix is normalized, and the corresponding grayscale matrix is output as the localization result. The process of normalizing the reconstructed matrix and outputting the corresponding grayscale matrix as the localization result includes the following steps: Determine the number of highlighted regions within the grayscale matrix; If a bright area exists, the target location is determined to be within the sub-spot area corresponding to the bright area, and the sub-spot area is used as the location result. If multiple bright areas exist, the target location is determined to be within the overlapping sub-spot area corresponding to the multiple bright areas, and the overlapping sub-spot area is used as the location result.
2. The indoor positioning method according to claim 1, characterized in that, The step of identifying the modulation matrix and obtaining the illumination sequence corresponding to the LED array includes the following steps: The LED array comprises m LEDs, wherein the illumination sequence of the m-th LED is L. m (n)=H m+1,n ;in m = 1, 2, ..., 2 k -1; n = 1, 2, ..., 2 k H m+1,n The (m+1)th row and nth column of the Hadamard matrix; Based on the lighting sequence of the m LEDs, the lighting sequence corresponding to the LED array is obtained as follows: Among them, A n Let n be the illumination pattern of the LED array at time n, where +1 and -1 represent the on and off states of the LEDs, respectively.
3. An indoor positioning system, characterized in that, include: The first acquisition module (1) is used to acquire the application scenario; The second acquisition module (2) is used to acquire the corresponding LED array according to the positioning requirements of the application scenario; The first modulation module (3) is used to modulate the LED array according to a preset matrix rule to generate a corresponding modulation matrix; The step of modulating the LED array according to a preset matrix rule to generate a corresponding modulation matrix includes the following steps: The preset matrix rule is the Hadamard matrix, and the structure of the Hadamard matrix is as follows: Where H2 is a 2nd order Hadamard matrix, 2 k A higher-order Hadamard matrix is obtained by combining a lower-order Hadamard matrix. In the Hadamard matrix, +1 and -1 represent the on and off states of the LED, respectively. Select the second row to the second row of the Hadamard matrix. k The row serves as the modulation matrix of the LED array; The second modulation module (4) is used to identify the modulation matrix and obtain the lighting sequence corresponding to the LED array; The step of driving the LED array according to the lighting sequence to generate the corresponding light spot area includes the following steps: Based on the preset lens, a light spot projection module corresponding to the LED array is formed; According to the light spot projection module, the light of the LED array is imaged onto the positioning surface to form a corresponding light spot area. The light spot areas corresponding to each LED in the LED array can be independent or partially overlap. The driving module (5) is used to drive the LED array according to the lighting sequence to generate the corresponding light spot area; The analysis module (6) is used to analyze the light spot area and obtain the corresponding light intensity information; The demodulation module (7) is used to demodulate the light intensity information according to a preset correlation reconstruction algorithm and obtain the reconstruction matrix corresponding to the light spot region; The step of demodulating the light intensity information according to a preset correlation reconstruction algorithm to obtain the reconstruction matrix corresponding to the light spot region includes the following steps: The light intensity information is demodulated according to the preset association reconstruction algorithm to generate the reconstruction matrix indicating the location of the target positioning area. The preset association reconstruction algorithm is as follows: P'=<A n S n >-<A n ><S n >; In the formula A n S represents the illumination pattern of the LED array at time n. n The received signal at time n is used to locate the target, P' is the reconstruction matrix obtained by the preset association reconstruction algorithm, and <> is the average calculation of N samples; The positioning module (8) is used to normalize the reconstruction matrix and output the corresponding gray matrix as the positioning result. The process of normalizing the reconstructed matrix and outputting the corresponding grayscale matrix as the localization result includes the following steps: Determine the number of highlighted regions within the grayscale matrix; If a bright area exists, the target location is determined to be within the sub-spot area corresponding to the bright area, and the sub-spot area is used as the location result. If multiple bright areas exist, the target location is determined to be within the overlapping sub-spot area corresponding to the multiple bright areas, and the overlapping sub-spot area is used as the location result.
4. A terminal device, comprising a memory and a processor, characterized in that, The memory stores a computer program that can run on a processor. When the processor loads and executes the computer program, it employs an indoor positioning method according to any one of claims 1 to 2.
5. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is loaded and executed by the processor, it employs an indoor positioning method according to any one of claims 1 to 2.
Citation Information
Patent Citations
CDMA coding method based on visible light indoor location
CN106130602A
CDMA modulation based 3D positioning method of visible light communication (VLC)
CN106483500A