CN108120435A - A kind of plant area's alignment system and localization method based on visible ray - Google Patents

A kind of plant area's alignment system and localization method based on visible ray Download PDF

Info

Publication number
CN108120435A
CN108120435A CN201711431300.5A CN201711431300A CN108120435A CN 108120435 A CN108120435 A CN 108120435A CN 201711431300 A CN201711431300 A CN 201711431300A CN 108120435 A CN108120435 A CN 108120435A
Authority
CN
China
Prior art keywords
information
led
mobile phone
smart mobile
light
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711431300.5A
Other languages
Chinese (zh)
Inventor
张锋
舒磊
傅树霞
言理
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Petrochemical Technology
Original Assignee
Guangdong University of Petrochemical Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Petrochemical Technology filed Critical Guangdong University of Petrochemical Technology
Priority to CN201711431300.5A priority Critical patent/CN108120435A/en
Publication of CN108120435A publication Critical patent/CN108120435A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/04Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by terrestrial means
    • G01C21/06Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by terrestrial means involving measuring of drift angle; involving correction for drift
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/04Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by terrestrial means
    • G01C21/08Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by terrestrial means involving use of the magnetic field of the earth
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/10Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration
    • G01C21/12Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning
    • G01C21/16Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation
    • G01C21/18Stabilised platforms, e.g. by gyroscope
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/20Instruments for performing navigational calculations
    • G01C21/206Instruments for performing navigational calculations specially adapted for indoor navigation

Landscapes

  • Engineering & Computer Science (AREA)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Environmental & Geological Engineering (AREA)
  • General Life Sciences & Earth Sciences (AREA)
  • Geology (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)
  • Optical Communication System (AREA)

Abstract

本发明提供的基于可见光的厂区定位系统及定位方法,使用了PWM编码方式,使LED灯具在发送ID信息的同时不影响其照明需求;在调制上,采用主控制器对灯具的ID信息进行调制,并通过LED驱动电路使LED灯具发出的光蕴含了LED灯具的ID信息。采用了智能手机内置摄像头对LED灯具发出的可见光进行采集,利用图像传感器的特性获取灯光信息,将LED灯光的明暗条纹信息逐行扫描进智能手机。在解码方面,利用数字图像处理技术,对获取的明暗条纹进行处理,得到明暗条纹中包含的二进制信息,最后转化为8位十六进制的数字信息;结合智能手机的水平仪等综合参数,通过优化的算法进行定位建模和数据解算,实现了室内精确定位。The plant area positioning system and positioning method based on visible light provided by the present invention use the PWM coding method, so that the LED lamps do not affect their lighting requirements while sending ID information; in terms of modulation, the main controller is used to modulate the ID information of the lamps , and through the LED driving circuit, the light emitted by the LED lamp contains the ID information of the LED lamp. The built-in camera of the smart phone is used to collect the visible light emitted by the LED lamp, and the characteristics of the image sensor are used to obtain the light information, and the light and dark stripe information of the LED light is scanned into the smart phone line by line. In terms of decoding, digital image processing technology is used to process the acquired light and dark stripes to obtain the binary information contained in the light and dark stripes, which is finally converted into 8-digit hexadecimal digital information; The optimized algorithm performs positioning modeling and data calculation, and realizes indoor precise positioning.

Description

一种基于可见光的厂区定位系统及定位方法A factory area positioning system and positioning method based on visible light

技术领域technical field

本发明涉及一种基于可见光的厂区定位系统及定位方法,属于定位技术领域。The invention relates to a plant area positioning system and positioning method based on visible light, belonging to the technical field of positioning.

背景技术Background technique

当前,石化企业里厂区内定位问题已经得到了高度的关注,业界已经设计并生产出了一些对厂区内定位的设备。但是,现有的厂区内定位技术是采用无线电波为主的定位技术,而尚处在发展中的室内定位技术,大多是采用无线局域网络或者无线电波进行定位的。在实际运行中,定位无线电波容易受到其他无线电信号的干扰和墙体的削弱,定位精度低,功耗大,成本高,因此需要进一步的研究。At present, the positioning problem in the plant area of petrochemical enterprises has been highly concerned, and the industry has designed and produced some equipment for positioning in the plant area. However, the existing positioning technology in the factory area mainly uses radio wave positioning technology, while the indoor positioning technology that is still under development mostly uses wireless local area network or radio wave for positioning. In actual operation, positioning radio waves are easily interfered by other radio signals and weakened by walls, resulting in low positioning accuracy, high power consumption, and high cost, so further research is needed.

发明内容Contents of the invention

为解决现有技术的不足,本发明的目的在于提供一种基于可见光的厂区定位系统及定位方法,该种定位系统采用了基于LED白光的室内定位技术,由于LED白光遍及厂区内部,在保证定位精度的情况下,充分利用厂区内LED白光,室内定位无电磁污染,部署容易,既满足了照明要求,又降低了功耗和成本。同时不受无线电等的干扰,这些优势很好地弥补了其他室内定位方式的缺点和不足。随着下一代绿色LED照明技术的发展,基于可见光的室内定位方案将是一种很有前景的室内定位方案。In order to solve the deficiencies of the prior art, the object of the present invention is to provide a plant area positioning system and positioning method based on visible light. This positioning system adopts the indoor positioning technology based on LED white light. In the case of high precision, make full use of the LED white light in the factory area, the indoor positioning has no electromagnetic pollution, and the deployment is easy, which not only meets the lighting requirements, but also reduces power consumption and cost. At the same time, it will not be interfered by radio, etc. These advantages well make up for the shortcomings and deficiencies of other indoor positioning methods. With the development of next-generation green LED lighting technology, the indoor positioning scheme based on visible light will be a promising indoor positioning scheme.

为了实现上述目标,本发明采用如下的技术方案:In order to achieve the above object, the present invention adopts the following technical solutions:

一种基于可见光的厂区定位系统,其特征是,包括可见光发射单元、智能手机和位置服务器,A plant positioning system based on visible light is characterized in that it includes a visible light emitting unit, a smart phone and a location server,

所述可见光发射单元,将需要传输的LED灯具ID信息加载到LED灯光的明暗变化中;The visible light emitting unit loads the ID information of the LED lamp to be transmitted into the light and dark changes of the LED lamp;

所述智能手机,接收LED灯具明暗变化的灯光包含的ID信息并解码,解析获得LED灯具发送的唯一身份识别ID信息,利用智能手机内置的水平仪获取智能手机的水平和垂直倾斜信息,利用内置的陀螺仪获取智能手机的地磁偏角信息,通过灯成像的大小获取智能手机与灯具之间的距离信息,智能手机把ID信息上传到位置服务器;The smart phone receives and decodes the ID information contained in the light of the LED lamp that changes in brightness and darkness, analyzes and obtains the unique identification ID information sent by the LED lamp, uses the built-in spirit level of the smart phone to obtain the horizontal and vertical tilt information of the smart phone, and uses the built-in The gyroscope obtains the geomagnetic declination information of the smart phone, obtains the distance information between the smart phone and the lamp through the size of the lamp image, and the smart phone uploads the ID information to the location server;

所述位置服务器,其内的地图数据库返回厂区内位置坐标,利用智能手机所获取的参数信息在地图数据库中确定对应的位置,并在智能手机上进行显示以及实时更新,从而完成定位。The location server, in which the map database returns the location coordinates in the factory area, uses the parameter information acquired by the smart phone to determine the corresponding position in the map database, and displays and updates in real time on the smart phone, thereby completing the positioning.

前述的一种基于可见光的厂区定位系统,其特征是,所述可见光发射单元包括基于STM32的主控制器,LED光源以及LED驱动电路。The aforementioned visible light-based factory area positioning system is characterized in that the visible light emitting unit includes a master controller based on STM32, an LED light source and an LED driving circuit.

前述的一种基于可见光的厂区定位系统,其特征是,所述LED光源选用3W的大功率白光LED作为信号源,其额定参数为9V、330mA。The aforementioned visible light-based factory positioning system is characterized in that the LED light source uses a 3W high-power white LED as the signal source, and its rated parameters are 9V and 330mA.

前述的一种基于可见光的厂区定位系统,其特征是,所述LED驱动电路经过基于STM32的主控制器编码产生的传输信息作为驱动电路的输入,将输入信号进行放大的同时给予偏置,确保LED光源正常工作,所述LED驱动电路根据所用LED光源的特性通过调节可变电阻值实现对输出量的改变。The aforesaid plant location system based on visible light is characterized in that the transmission information generated by the LED drive circuit through the STM32-based main controller code is used as the input of the drive circuit, and the input signal is amplified while giving a bias to ensure The LED light source works normally, and the LED drive circuit realizes the change of the output by adjusting the variable resistance value according to the characteristics of the LED light source used.

前述的一种基于可见光的厂区定位系统,其特征是,所述智能手机内设置有水平仪、陀螺仪。The aforementioned visible light-based factory positioning system is characterized in that a spirit level and a gyroscope are arranged in the smart phone.

前述的一种基于可见光的厂区定位系统的定位方法,其特征是,包括以下步骤,The aforementioned positioning method of a factory area positioning system based on visible light is characterized in that it includes the following steps,

步骤(A),可见光发射单元将需要传输的LED灯具ID信息加载到LED灯光的明暗变化中;Step (A), the visible light emitting unit loads the ID information of the LED lamp to be transmitted into the light and dark changes of the LED light;

步骤(B),利用智能手机的摄像头作为接收ID信息的终端来接收LED灯具明暗变化的灯光包含的ID信息并解码,解析获得LED灯具发送的唯一身份识别ID信息,利用智能手机内置的水平仪获取智能手机的水平和垂直倾斜信息,利用内置的陀螺仪获取智能手机的地磁偏角信息,通过灯成像的大小获取智能手机与灯具之间的距离信息,智能手机把ID信息上传到位置服务器;Step (B), use the camera of the smart phone as the terminal to receive the ID information to receive and decode the ID information contained in the lights of the LED lamps that change in brightness and darkness, analyze and obtain the unique identification ID information sent by the LED lamps, and use the built-in level of the smart phone to obtain The horizontal and vertical tilt information of the smart phone, the geomagnetic declination information of the smart phone is obtained by using the built-in gyroscope, the distance information between the smart phone and the lamp is obtained through the size of the lamp image, and the smart phone uploads the ID information to the location server;

步骤(C),位置服务器的地图数据库返回厂区内位置坐标,利用智能手机所获取的参数信息在地图数据库中确定对应的位置,并在智能手机上进行显示以及实时更新,从而完成定位。Step (C), the map database of the location server returns the location coordinates in the factory area, uses the parameter information obtained by the smartphone to determine the corresponding location in the map database, and displays and updates it in real time on the smartphone to complete the positioning.

本发明所达到的有益效果:本发明提供的基于可见光的厂区定位系统及定位方法,使用了PWM编码方式,使LED灯具在发送ID信息的同时不影响其照明需求;在调制上,采用主控制器对灯具的ID信息进行调制,并通过LED驱动电路使LED灯具发出的光蕴含了LED灯具的ID信息。采用了智能手机内置摄像头对LED灯具发出的可见光进行采集,而不是传统的接收天线接收无线电信息,利用图像传感器的特性获取灯光信息,将LED灯光的明暗条纹信息逐行扫描进智能手机。在解码方面,也没有采用传统无线电波解码的方式,而是利用数字图像处理技术,对获取的明暗条纹进行处理,得到明暗条纹中包含的二进制信息,最后转化为8位十六进制的数字信息;结合智能手机的水平仪等综合参数,通过优化的算法进行定位建模和数据解算,实现了室内精确定位。The beneficial effects achieved by the present invention: the visible light-based plant positioning system and positioning method provided by the present invention use the PWM coding method, so that the LED lamps do not affect their lighting requirements while sending ID information; in terms of modulation, the main control The device modulates the ID information of the lamp, and through the LED driving circuit, the light emitted by the LED lamp contains the ID information of the LED lamp. The built-in camera of the smart phone is used to collect the visible light emitted by the LED lamp, instead of the traditional receiving antenna to receive radio information, and the characteristics of the image sensor are used to obtain the light information, and the light and dark stripe information of the LED light is scanned into the smart phone line by line. In terms of decoding, the traditional radio wave decoding method is not adopted, but digital image processing technology is used to process the obtained light and dark stripes to obtain the binary information contained in the light and dark stripes, and finally convert them into 8-digit hexadecimal numbers. Information; combined with comprehensive parameters such as the level of the smartphone, positioning modeling and data calculation are carried out through optimized algorithms to achieve accurate indoor positioning.

附图说明Description of drawings

图1是本发明的基于可见光的厂区定位系统的定位方法的原理框图。Fig. 1 is a functional block diagram of the positioning method of the plant area positioning system based on visible light according to the present invention.

具体实施方式Detailed ways

下面结合附图对本发明作进一步描述。以下实施例仅用于更加清楚地说明本发明的技术方案,而不能以此来限制本发明的保护范围。The present invention will be further described below in conjunction with the accompanying drawings. The following examples are only used to illustrate the technical solution of the present invention more clearly, but not to limit the protection scope of the present invention.

一种基于可见光的厂区定位系统,包括可见光发射单元、智能手机和位置服务器,A plant area positioning system based on visible light, including a visible light emitting unit, a smart phone and a location server,

所述可见光发射单元,将需要传输的LED灯具ID信息加载到LED灯光的明暗变化中;The visible light emitting unit loads the ID information of the LED lamp to be transmitted into the light and dark changes of the LED lamp;

所述智能手机,接收LED灯具明暗变化的灯光包含的ID信息并解码,解析获得LED灯具发送的唯一身份识别ID信息,利用智能手机内置的水平仪获取智能手机的水平和垂直倾斜信息,利用内置的陀螺仪获取智能手机的地磁偏角信息,通过灯成像的大小获取智能手机与灯具之间的距离信息,智能手机把ID信息上传到位置服务器;The smart phone receives and decodes the ID information contained in the light of the LED lamp that changes in brightness and darkness, analyzes and obtains the unique identification ID information sent by the LED lamp, uses the built-in spirit level of the smart phone to obtain the horizontal and vertical tilt information of the smart phone, and uses the built-in The gyroscope obtains the geomagnetic declination information of the smart phone, obtains the distance information between the smart phone and the lamp through the size of the lamp image, and the smart phone uploads the ID information to the location server;

所述位置服务器,其内的地图数据库返回厂区内位置坐标,利用智能手机所获取的参数信息在地图数据库中确定对应的位置,并在智能手机上进行显示以及实时更新,从而完成定位。The location server, in which the map database returns the location coordinates in the factory area, uses the parameter information acquired by the smart phone to determine the corresponding position in the map database, and displays and updates in real time on the smart phone, thereby completing the positioning.

进一步的,所述可见光发射单元包括基于STM32的主控制器,LED光源以及LED驱动电路。所述LED光源选用3W的大功率白光LED作为信号源,其额定参数为9V、330mA,为在尽可能不影响光源正常工作的前提下实现稳定可靠的无线通信,系统选用略低于额定工作电流的300mA作为直流偏置点。原因是在在最大工作电流范围内,LED光源功率与电流呈线性关系,光源具有良好的调制特性。所述LED驱动电路经过基于STM32的主控制器编码产生的传输信息作为驱动电路的输入,将输入信号进行放大的同时给予偏置,确保LED光源正常工作,所述LED驱动电路根据所用LED光源的特性通过调节可变电阻值实现对输出量的改变,依据实际应用中的光源参数进行灵活调节,LED驱动电路除了提供足够大的电流以保证白光的正常工作外,还须提供合适的静态工作点,使光源能输出足够的功率并具有良好的线性度,确保信号经调制后能线性输出。Further, the visible light emitting unit includes a main controller based on STM32, an LED light source and an LED driving circuit. The LED light source uses a 3W high-power white light LED as the signal source, and its rated parameters are 9V and 330mA. The 300mA is used as the DC bias point. The reason is that within the maximum operating current range, the power of the LED light source has a linear relationship with the current, and the light source has good modulation characteristics. The transmission information generated by the LED drive circuit based on the STM32-based main controller code is used as the input of the drive circuit, and the input signal is amplified while giving a bias to ensure the normal operation of the LED light source. The LED drive circuit is based on the LED light source used. The output can be changed by adjusting the variable resistance value, and it can be flexibly adjusted according to the light source parameters in the actual application. In addition to providing a large enough current to ensure the normal operation of the white light, the LED drive circuit must also provide suitable static operation. point, so that the light source can output sufficient power and have good linearity, and ensure that the signal can be output linearly after modulation.

进一步的,所述水平仪、陀螺仪采用苹果机iMac作为开发硬件,以IOS系统作为开发环境,系统版本为X EI Capitan以上,开发工具为Xcode 7.31。Further, described spirit level, gyroscope adopt Apple computer iMac as development hardware, take IOS system as development environment, system version is above X EI Capitan, and development tool is Xcode 7.31.

一种基于可见光的厂区定位系统的定位方法,包括以下步骤,A positioning method of a factory area positioning system based on visible light, comprising the following steps,

步骤(A),可见光发射单元将需要传输的LED灯具ID信息加载到LED灯光的明暗变化中;Step (A), the visible light emitting unit loads the ID information of the LED lamp to be transmitted into the light and dark changes of the LED light;

步骤(B),利用智能手机的摄像头作为接收ID信息的终端来接收LED灯具明暗变化的灯光包含的ID信息并解码,解析获得LED灯具发送的唯一身份识别ID信息,利用智能手机内置的水平仪获取智能手机的水平和垂直倾斜信息,利用内置的陀螺仪获取智能手机的地磁偏角信息,通过灯成像的大小获取智能手机与灯具之间的距离信息,智能手机把ID信息上传到位置服务器;Step (B), use the camera of the smart phone as the terminal to receive the ID information to receive and decode the ID information contained in the lights of the LED lamps that change in brightness and darkness, analyze and obtain the unique identification ID information sent by the LED lamps, and use the built-in level of the smart phone to obtain The horizontal and vertical tilt information of the smart phone, the geomagnetic declination information of the smart phone is obtained by using the built-in gyroscope, the distance information between the smart phone and the lamp is obtained through the size of the lamp image, and the smart phone uploads the ID information to the location server;

步骤(C),位置服务器的地图数据库返回厂区内位置坐标,利用智能手机所获取的参数信息在地图数据库中确定对应的位置,并在智能手机上进行显示以及实时更新,从而完成定位。Step (C), the map database of the location server returns the location coordinates in the factory area, uses the parameter information obtained by the smartphone to determine the corresponding location in the map database, and displays and updates it in real time on the smartphone to complete the positioning.

该种定位系统的定位方法中,数据传输的格式包括:起始码头、地址码、地址反码、指令码、指令反码和结束码。起始码头由一个连续的235μs的高低电平组成,结束码由一个150μs低电平组成。地址码、地址反码、指令码和指令反码均为8位据格式,按照低位在前高位在后的顺序发送,增加地址反码和指令反码是为了提高信息传输过程中的准确性和可靠性。LED光源在循环发送位置ID信息的过程中,在空闲时隙系统向LED光源发送的均为高电平,以保证LED光源能正常提供照明服务。通常将一个逻辑1的传输设定为112μs(28μs高电平和84μs低电平),一个逻辑0的传输设定为56μs(28μs高电平和28μs低电平)。为避免在定位区域中出现待测目标同时接收多个信号源发来的位置信息而出现的混乱现象,系统在发射端对多个LED光源进行分时发送信号,当传输信号的频率大于60Hz时,白光LED不会出现明显的闪烁现象,人眼也无法分辨,但如果出现连续的逻辑1或连续的逻辑0时,将会导致LED光源发光亮度发生变化,影响照明效果。因此在系统中采用上述编码方式可保证序列中每一比特由两个变化脉冲组成,可以有效减轻LED光源在发送位置ID信息时对照明产生的影响。在系统里,通过STM32的主控制器,控制LED灯具发出明暗变化的条纹,将LED灯具上的ID信息发送出去。In the positioning method of this positioning system, the format of data transmission includes: start port, address code, address inverse code, instruction code, instruction inverse code and end code. The start terminal is composed of a continuous 235μs high and low level, and the end code is composed of a 150μs low level. The address code, address inverse code, instruction code and instruction inverse code are all in 8-bit data format, and are sent in the order of low-order first and high-order. Adding address inverse code and instruction inverse code is to improve the accuracy and accuracy of information transmission. reliability. During the process of cyclically sending the position ID information of the LED light source, the system sends high level to the LED light source in idle time slots, so as to ensure that the LED light source can provide lighting services normally. Usually the transmission of a logic 1 is set to 112μs (28μs high level and 84μs low level), and the transmission of a logic 0 is set to 56μs (28μs high level and 28μs low level). In order to avoid confusion in the positioning area where the target to be measured receives position information from multiple signal sources at the same time, the system transmits signals to multiple LED light sources in time-sharing at the transmitting end. When the frequency of the transmitted signal is greater than 60Hz , white LED will not appear obvious flicker phenomenon, human eyes can not distinguish, but if there is continuous logic 1 or continuous logic 0, it will lead to changes in the brightness of the LED light source, affecting the lighting effect. Therefore, using the above encoding method in the system can ensure that each bit in the sequence is composed of two changing pulses, which can effectively reduce the impact of the LED light source on the lighting when sending position ID information. In the system, through the main controller of STM32, the LED lamps are controlled to emit light and dark stripes, and the ID information on the LED lamps is sent out.

本系统使用烧录在STM32中的相关程序来执行。为了在发送编码的时候能够不影响灯具的照明效率,保证其不会因为明暗不均匀而闪烁,因此采用特殊的编码方式。在这种编码方式中,将一个时间间隔T的暗条纹和一个时间间隔T的亮条纹作为0的编码方式,将一个时间间隔T的亮条纹和一个时间间隔T的暗条纹作为0的编码方式。这样,无论是发送0还是1,都能保证灯具的发光效率保持在50%,避免了发送编码时由于单位时间内发光量不同导致闪烁影响照明。同时在地址码的头部加入码头信息,确定地址码起始位置,后面采用8位十六进制数表示灯具ID,传输速度快,效率高。This system uses related programs programmed in STM32 to execute. In order not to affect the lighting efficiency of the luminaire when sending the code, and to ensure that it will not flicker due to uneven brightness and darkness, a special coding method is adopted. In this encoding method, a dark stripe with a time interval T and a bright stripe with a time interval T are regarded as 0, and a bright stripe with a time interval T and a dark stripe with a time interval T are regarded as 0. . In this way, whether 0 or 1 is sent, the luminous efficiency of the lamp can be kept at 50%, which avoids flickering and affecting lighting due to different luminous quantities per unit time when sending codes. At the same time, add terminal information to the head of the address code to determine the starting position of the address code, and then use 8-digit hexadecimal numbers to represent the ID of the lamp, with fast transmission speed and high efficiency.

在通信中,为了使数字信号在有限带宽的高频信道中传输,必须对数字信号进行载波调制。本系统利用的是二进制启闭键控调制。二进制启闭键控是以单极性不归零码序列来控制正弦载波的开启与关闭。把一个幅度取为0,另一个幅度为非0,能够让接收端更好的接收并解码。另外,为了在不影响照明的同时能够完成光信息的传输,故不能让LED灯具闪烁,因此在调制方式并不仅仅是简单的OOK调制,还需要将PWM信号加载到LED驱动上,LED照明灯具在正常照明的情况下发射出可见光信号,让智能手机的摄像头能够接收光信号,用于厂区内定位。In communication, in order to transmit the digital signal in the high-frequency channel with limited bandwidth, it is necessary to carry out carrier modulation on the digital signal. What this system utilizes is binary on-off keying modulation. Binary ON/OFF keying uses a unipolar non-return-to-zero code sequence to control the ON/OFF of the sinusoidal carrier. Setting one amplitude to 0 and the other to non-zero can allow the receiving end to receive and decode better. In addition, in order to complete the transmission of light information without affecting the lighting, the LED lamps cannot be flickered. Therefore, the modulation method is not only simple OOK modulation, but also needs to load the PWM signal to the LED driver. LED lighting lamps Visible light signals are emitted under normal lighting conditions, allowing smartphone cameras to receive light signals for positioning within the factory.

由于LED灯具能够根据驱动电压或电流的变化做出快速反应,因此,利用图像传感器分时逐行读取图像信息的特性,通过对光源的驱动电流或驱动电压进行调制,确切地说是通过改变驱动电流或驱动电压中高低电平的频率和持续时间,在图像传感器输出的图像上形成不同的明暗条纹。然后,根据数字图像处理的原理,检测图像中明条纹或暗条纹的数量或相位,通过计算来获取驱动电流中加载的频率信息。而后,根据频率信息来确定所传输的编码。最后,根据特定的解码方式恢复所传输的信息。本系统中,智能手机采用的图像传感器为CMOS传感器。图像传感器读行像素按照次序重置,从最上面开始,按行进行读取直至最下方。Since LED lamps can respond quickly to changes in driving voltage or current, the characteristics of the image sensor to read image information row by row in time division are used to modulate the driving current or driving voltage of the light source, to be precise, by changing The frequency and duration of high and low levels in the driving current or driving voltage form different light and dark stripes on the image output by the image sensor. Then, according to the principle of digital image processing, the number or phase of bright or dark fringes in the image is detected, and the frequency information loaded in the driving current is obtained through calculation. The transmitted code is then determined from the frequency information. Finally, the transmitted information is recovered according to a specific decoding method. In this system, the image sensor adopted by the smartphone is a CMOS sensor. Image sensor read row pixels are reset in order, starting from the top, and read row by row until the bottom.

解码,是编码的逆过程。利用摄像头的工作原理,通过智能手机拍摄出明暗变化的条纹图片,结合数字图像处理技术,对灯光图片中的明暗条纹进行处理识别,转化为对应的二进制数据。再根据编码规则的反编译方式对二进制数据进行换算,得到LED灯具发送的八位十六进制ID信息。Decoding is the reverse process of encoding. Using the working principle of the camera, the light and dark stripe pictures of light and dark changes are taken by smart phones, combined with digital image processing technology, the light and dark stripes in the light pictures are processed and recognized, and converted into corresponding binary data. Then convert the binary data according to the decompilation method of the coding rules to obtain the eight-digit hexadecimal ID information sent by the LED lamp.

利用智能手机内置的水平仪和陀螺仪,可以准确获得智能手机水平和垂直方向的倾斜角度,同时,结合智能手机拍摄的灯的成像大小关系,结合水平和倾斜角度信息,利用APP内置的求解模型,可以计算出灯相对于使用者的距离,即可以确定使用者位于距离灯一定距离的圆周上,利用智能手机内置的指北针信息,可以获得使用者的地磁偏角等方位信息。Using the built-in spirit level and gyroscope in the smart phone, you can accurately obtain the horizontal and vertical tilt angles of the smart phone. At the same time, combined with the size relationship of the light image taken by the smart phone, combined with the horizontal and tilt angle information, using the APP built-in solution model, The distance between the light and the user can be calculated, that is, it can be determined that the user is located on a circle at a certain distance from the light. Using the compass information built into the smartphone, the user's geomagnetic declination and other azimuth information can be obtained.

智能手机启动后,利用终端摄像头获取灯具ID信息,利用内置MCU解码获得灯具ID信息,可确定使用者位于确定ID的灯具附近。同时,根据拍摄的灯具图像的大小关系,同时利用智能手机内置的水平仪、陀螺仪和指北针获取相对应的参数,例如,利用水平仪获得的智能手机的水平和倾斜角度,利用构建的室内定位模型,结合使用者和灯具的距离信息可以综合计算出准确的位置信息。将位置信息与云端或者智能手机内置的地图库进行匹配,对位置坐标进行显示,并重新从终端摄像头获取灯具信息,结合实时更新的传感器信息,对地图上的位置信息进行实时更新显示,从而完成对厂区内人员的定位。After the smart phone is started, use the terminal camera to obtain the ID information of the lamp, and use the built-in MCU to decode and obtain the ID information of the lamp, so that it can be determined that the user is located near the lamp with the ID. At the same time, according to the size relationship of the photographed lamp images, the corresponding parameters are obtained by using the built-in level meter, gyroscope and compass of the smart phone. Model, combined with the distance information of users and lamps, can comprehensively calculate accurate position information. Match the location information with the cloud or the built-in map library of the smart phone, display the location coordinates, and re-obtain the lamp information from the terminal camera, combined with the real-time updated sensor information, update and display the location information on the map in real time, thus completing Positioning of personnel in the plant area.

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明技术原理的前提下,还可以做出若干改进和变形,这些改进和变形也应视为本发明的保护范围。The above is only a preferred embodiment of the present invention, it should be pointed out that for those of ordinary skill in the art, without departing from the technical principle of the present invention, some improvements and modifications can also be made. It should also be regarded as the protection scope of the present invention.

Claims (6)

1. a kind of plant area's alignment system based on visible ray, it is characterized in that, including VISIBLE LIGHT EMISSION unit, smart mobile phone and position Server,
The VISIBLE LIGHT EMISSION unit, it would be desirable to which the LED lamp id information of transmission is loaded into the light and shade variation of LED lamplight;
The smart mobile phone, receives the id information that the light of LED lamp light and shade variation includes and decoding, parsing obtain LED lamp The unique identities identification id information of transmission obtains the horizontal and vertical tilt of smart mobile phone using the level meter built in smart mobile phone Information obtains the geomagnetic declination information of smart mobile phone using built-in gyroscope, the acquiring size smart mobile phone being imaged by lamp Id information is uploaded to location server by the distance between lamps and lanterns information, smart mobile phone;
The location server, in map data base return on-site position coordinates, utilize the ginseng acquired in smart mobile phone Number information determine corresponding position in map data base, and are shown on smart mobile phone and real-time update, so as to complete Into positioning.
2. a kind of plant area's alignment system based on visible ray according to claim 1, it is characterized in that, the VISIBLE LIGHT EMISSION Unit includes the master controller based on STM32, LED light source and LED drive circuit.
3. a kind of plant area's alignment system based on visible ray according to claim 2, it is characterized in that, the LED light source choosing By the use of the large power white light LED of 3W as signal source, nominal parameter 9V, 330mA.
4. a kind of plant area's alignment system based on visible ray according to claim 2, it is characterized in that, the LED drivings electricity Input of the transmission information as LED drive circuit that road is generated by the master controller coding based on STM32, by input signal into It gives and biases while row amplification, it is ensured that LED light source works normally, and the LED drive circuit is according to the characteristic of LED light source used By adjusting change of the variable resistance realization to output quantity.
5. a kind of plant area's alignment system based on visible ray according to claim 1, it is characterized in that, in the smart mobile phone Level meter, the gyroscope of setting are used as exploitation hardware, using IOS systems as development environment, system version using Macintosh iMac For more than X EI Capitan, developing instrument is Xcode 7.31.
It is 6. special according to a kind of localization method of plant area's alignment system based on visible ray of claim 1-5 any one of them Sign is to comprise the following steps,
Step(A), it is seen that the LED lamp id information for needing to transmit is loaded into the light and shade variation of LED lamplight by light emitting unit;
Step(B), the lamp that LED lamp light and shade changes is received by the use of the camera of smart mobile phone as the terminal for receiving id information Id information that light includes and decoding, parsing obtains the unique identities identification id information that LED lamp is sent, using built in smart mobile phone Level meter obtain the horizontal and vertical tilt information of smart mobile phone, built-in gyroscope is utilized to obtain the ground magnetic biasing of smart mobile phone Angle information, the distance between the acquiring size smart mobile phone and lamps and lanterns that are imaged by lamp information, smart mobile phone upload id information To location server;
Step(C), the map data base of location server returns to on-site position coordinates, utilizes the parameter acquired in smart mobile phone Information determines corresponding position in map data base, and is shown on smart mobile phone and real-time update, so as to complete Positioning.
CN201711431300.5A 2018-01-30 2018-01-30 A kind of plant area's alignment system and localization method based on visible ray Pending CN108120435A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711431300.5A CN108120435A (en) 2018-01-30 2018-01-30 A kind of plant area's alignment system and localization method based on visible ray

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711431300.5A CN108120435A (en) 2018-01-30 2018-01-30 A kind of plant area's alignment system and localization method based on visible ray

Publications (1)

Publication Number Publication Date
CN108120435A true CN108120435A (en) 2018-06-05

Family

ID=62231683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711431300.5A Pending CN108120435A (en) 2018-01-30 2018-01-30 A kind of plant area's alignment system and localization method based on visible ray

Country Status (1)

Country Link
CN (1) CN108120435A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108983147A (en) * 2018-08-06 2018-12-11 杭州电子科技大学 A kind of indoor locating system and method based on mobile terminal
CN109345835A (en) * 2018-09-05 2019-02-15 华北电力大学扬中智能电气研究中心 A kind of forward direction method for early warning and device based on truck traffic
CN109725286A (en) * 2018-12-19 2019-05-07 上海大学 An indoor positioning method for single-LED visible light communication based on any direction and angle of mobile phone

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108983147A (en) * 2018-08-06 2018-12-11 杭州电子科技大学 A kind of indoor locating system and method based on mobile terminal
CN109345835A (en) * 2018-09-05 2019-02-15 华北电力大学扬中智能电气研究中心 A kind of forward direction method for early warning and device based on truck traffic
CN109725286A (en) * 2018-12-19 2019-05-07 上海大学 An indoor positioning method for single-LED visible light communication based on any direction and angle of mobile phone

Similar Documents

Publication Publication Date Title
CN203519822U (en) Visible-light-based indoor positioning device and system
US8749146B2 (en) Auto commissioning of light fixture using optical bursts
JP6212753B2 (en) Visible light source, mobile terminal, and controller based position determination method
EP3622636B1 (en) Determining encoding schemes for formatting output signals of light-based communication enabled luminaires
CN104041191A (en) Visible light communication using remote control
JP2019500596A (en) Light-based vehicle localization for mobile communication systems
US10484091B2 (en) Light-based fiducial communication
CN108141280B (en) Adaptive Baud Rate in Optical-Based Communications
CN108120435A (en) A kind of plant area's alignment system and localization method based on visible ray
CN105425209A (en) Multispectral visible light positioning system for indoor positioning
US10505628B2 (en) Designated map luminaires
US20200066032A1 (en) Automated Luminaire Commissioning Using Computer Vision and Light-Based Communication
CN106932770A (en) A kind of indoor locating system and method based on LED
CN108495251A (en) A kind of combined positioning method positioned based on bluetooth and LED light
US10523365B2 (en) Discrimination method and communication system
CN110531318B (en) Method for indoor positioning extension of light-emitting unit ID (identity) in visible light imaging
CN113965259B (en) Single base station integrated communication and positioning integrated system based on visible light wireless transmission
CN106908763A (en) Localization method based on visible ray
CN105376893A (en) Dimmable light emitting diode (LED) lamp, dimming device and dimming system
JP4569144B2 (en) Illumination light communication system and receiving apparatus thereof
CN113922874B (en) Real-time positioning system based on visible light wireless transmission
CN208818820U (en) The parameter of visible light positioning device more new system
US10110865B2 (en) Lighting device, lighting system, and program
CN204334961U (en) A lighting and control device, terminal
JP2016178614A (en) Information transmission device and information acquisition device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180605