Underwater visible light communication device and communication method thereof

By integrating gyroscope and TIME timer algorithms in underwater visible light communication devices, dynamically adjusting the communication rate, solving the problem of unstable data transmission in underwater visible light communication, and achieving efficient and stable communication in different environments.

CN118984195BActive Publication Date: 2025-04-01ANHUI UNIVERSITY OF ARCHITECTURE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411269880.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-04-01
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

The prior art is difficult to realize adaptive optimization control of data communication rate in underwater visible light communication, especially in water quality attenuation, scattering effects and dynamic underwater environments, resulting in unstable data transmission.

Method used

A visible light communication device for underwater is designed, using MCU main control circuit, RS485 interface circuit, visible light source panel, optical signal receiving device, modulation circuit, demodulation circuit and MPU9250 attitude sensor. The attitude data is monitored in real time through the gyroscope, and the communication rate is dynamically adjusted in combination with the TIME timer algorithm to achieve the best quality communication in different environments.

Benefits of technology

It realizes data transmission at the best communication rate in different underwater communication environments, improving the stability of the communication system and the accuracy of data reception.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984195B_ABST
    Figure CN118984195B_ABST
Patent Text Reader

Abstract

The invention discloses an underwater visible light communication device and a communication method thereof. The device comprises an MCU main control circuit, an RS485 interface circuit, a visible light source panel, an optical signal receiving device, a modulation circuit, a demodulation circuit, and an MPU9250 attitude sensor. In the communication method, a gyroscope is used to monitor the attitude of a node of the communication device in real time, so as to obtain attitude data of the visible light communication device in real time, and a TIME timer algorithm is integrated to dynamically adjust the communication rate. Meanwhile, a universal asynchronous receiver / transmitter (UART) is used to integrate a double buffering algorithm of direct memory access (DMA), so as to solve the problem of insufficient MCU computing power resources and data coverage loss due to too fast transmission rate, and to ensure that the MCU has sufficient computing power to perform other work tasks during the communication process while ensuring accurate and correct data reception, thereby improving the stability of the entire communication system and solving the problem of failure to correctly receive valid data segments under the interference of seabed clutter signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of underwater visible light communication devices, and in particular to an underwater visible light communication device and a communication method thereof. Background Art

[0002] The ocean is rich in resources, and the scope of human exploration of the ocean is constantly expanding. The exploration and development of the ocean is inevitably inseparable from underwater operations. As the depth and breadth of human diving gradually increase, the scope of activities gradually expands. Traditional underwater wireless communication methods, such as underwater acoustic communication, cannot fully meet the needs of modern underwater exploration and development due to its shortcomings such as low bandwidth, high link delay, and large equipment size. However, visible light communication performs better than traditional underwater acoustic communication in the spectrum, and due to its advantages such as high bandwidth, low link delay and strong anti-interference ability, it not only effectively overcomes the interference and limitations of the underwater environment on traditional wireless communication methods, but also has higher data transmission rate and lower link delay compared with acoustic wave communication. Therefore, in recent years, the research on underwater visible light communication UVLC (Underwater Visible Light Communication) technology has gradually entered the field of vision of researchers.

[0003] The research process of underwater visible light communication faces the following problems: how to solve the problem that the receiving end cannot receive accurate data due to the attenuation and scattering effect of water quality on light during underwater communication; how to ensure that data can be sent and received stably in a dynamic underwater environment; how to ensure that data can be sent and received stably through an adaptive communication rate algorithm when the equipment shakes due to ocean currents. Therefore, the present invention develops and implements an underwater visible light communication device and a communication method thereof, so as to achieve communication at the best quality communication rate in different communication environments. Summary of the invention

[0004] The present invention provides an underwater visible light communication device and a communication method thereof, so as to solve the problem that it is difficult to realize adaptive optimization control of data communication rate in the prior art underwater visible light communication.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is:

[0006] The underwater visible light communication device is characterized in that the device includes an MCU main control circuit, an RS485 interface circuit, a visible light source panel, an optical signal receiving device, a modulation circuit, a demodulation circuit, and an MPU9250 attitude sensor. The MCU is electrically connected to the driving circuit control of the visible light source through the modulation circuit, the optical signal receiving device is electrically connected to the MCU signal transmission through the demodulation circuit, and the gyroscope is electrically connected to the MCU signal transmission;

[0007] During the communication process, when data is transmitted, the visible light communication device receives the data information sent by the host computer through the RS485 bus, and slices and packages it into a frame containing 64 bytes of data, and controls the modulation process through the MCU to convert the TTL level signal into a binary state and input it to the control pin of the light source driving circuit, thereby controlling the on and off of the driving circuit to drive the visible light source to strobe, thereby forming a stroboscopic signal sent to other visible light communication devices as a communication signal;

[0008] When receiving communication signals during the communication process, the light source will be filtered by the physical layer filter before it is received to eliminate the interference of stray light and converge to the silicon photodiode window through the lens for light source signal collection. The collected light source signal is converted into a weak current signal and transmitted to the demodulation circuit. After being restored to the original TTL level signal by the demodulation circuit, it is sent to the MCU detection pin, and the MCU restores the TTL level signal to the corresponding original data;

[0009] In addition, before the communication starts, the gyroscope in the sender's visible light communication device collects its own posture data and sends it to the corresponding MCU for analysis. The MCU determines whether the posture meets the minimum communication requirements based on the posture data. If it does, a handshake is performed. If not, a communication failure signal is returned to the host computer through the RS485 bus and the appropriate communication rate is adjusted according to the three-dimensional posture data, and the handshake signal is resent after a unit of time.

[0010] During the communication process, the communication is carried out with the timing time set by the timer as a unit communication time period. During the data communication process, the gyroscope in the sender's visible light communication device continuously collects the current posture data of the sender's visible light communication device and sends it to the corresponding MCU for analysis. If the device posture is abnormal, the MCU in the sender's visible light communication device adjusts the communication rate and resends the handshake signal. Since the receiver will not be able to receive accurate data information after the sender's rate adjustment, the receiver will synchronously adjust the communication rate after a unit communication time period until the handshake signal sent by the sender is received and successfully responded. At this time, the handshake process is re-performed at the adjusted rate and communication begins.

[0011] A communication method for the underwater visible light communication device comprises the following steps:

[0012] Step 1: The sender obtains its own posture data and determines whether its own posture meets the communication conditions. If the posture of the sender's visible light communication device meets the communication conditions, the next step is performed. If the sender's visible light communication device does not meet the communication conditions, the upper computer is fed back with a communication failure status. At the same time, the sender adjusts the communication rate according to its own posture data and resends the handshake signal until the communication parties successfully shake hands and then proceed to the next step;

[0013] Step 2: The visible light communication device of the sender sends a handshake signal to the visible light communication device of the receiver. The visible light communication device of the receiver receives the handshake signal and sends a response signal to the visible light communication device of the sender, thereby completing a handshake between the sender and the receiver. After the first handshake is successful, a second handshake is performed. After both handshakes are successful, it indicates that a stable communication link has been successfully established and the next step is performed.

[0014] Step 3. After the handshake is successful, both parties start the timer synchronously. The time set by the timer is used as the unit time. The sender's visible light communication device sends a data signal to the receiver's visible light communication device within the unit time and counts the number of times. At the same time, the sender's visible light communication device obtains its own posture data in real time during the communication process. If the posture of the sender's visible light communication device is abnormal during the communication process, the sender's visible light communication device adjusts its own communication rate according to the three-dimensional posture data of the device. After the unit time ends, the sender's visible light communication device resends the handshake signal to the receiver's visible light communication device and repeats step 2. If the posture of the sender's visible light communication device is normal during the communication process, after the unit time, The sender's visible light communication device sends a SYN synchronization signal to the receiver's visible light communication device to confirm whether both parties can send and receive data normally during the communication process. After the receiver's visible light communication device successfully receives the SYN synchronization signal, if the data is normal, the receiver sends a secondary ACK response signal. If the sender receives the secondary ACK response signal sent by the receiver, the Normal_Reve parameter is incremented and data communication is performed for the next unit time. When Normal_Reve increases continuously and the value reaches the set parameter value, it indicates that the current communication environment is good. At this time, both parties synchronously increase the first-level communication rate and repeat step 2.

[0015] Further, in step 2, the data frame format of the first handshake signal includes a synchronization frame header SOF field, a function Function field, a communication rate BAUD field, a 0x01 data field, and a synchronization EOF frame tail field, wherein the synchronization frame header SOF field and the synchronization EOF frame tail field are the synchronization frame header and the synchronization frame tail in the fixed data frame format, the function Function field indicates whether the function of the current data command is a control command or a data transmission command, and the communication rate BAUD field indicates at what rate the current handshake process is performed;

[0016] The data frame format of the second handshake signal includes a synchronous frame header SOF field, a function Function field, a 0x02 data field, and a synchronous EOF frame tail field.

[0017] In step 2, the data frame format of the handshake response signal includes a synchronous frame header SOF field, a function Function field, a 0xAA data field, and a synchronous EOF frame tail field;

[0018] In step 3, the communication rate BAUD field is graded by enumeration, wherein the communication rate is gradually reduced and the communication rate is gradually increased on this basis.

[0019] Furthermore, the customized data frame format is: a synchronous frame header SOF field, a function Function field, a payload data field, a check bit and a synchronous EOF frame tail field, wherein the check bit is checked using a CheckSum check method, and the subsequent frame format functions differ in that the function Function field is different.

[0020] Furthermore, the function field is a 4-byte data segment, wherein the first two bytes indicate whether the current data packet is a command operation or transmitted data, and the last two bytes are valid only when the current data packet is a command operation.

[0021] Further, in step 3, when the visible light communication device of the current unit time transmitter determines that its own posture is normal in the current unit time, after the data signal of the current unit time is sent, the visible light communication device of the transmitter sends an SNY synchronization signal to the visible light communication device of the receiver, and the SNY synchronization signal includes the number of data transmissions of the visible light communication device of the transmitter in the current unit time;

[0022] When the receiving visible light communication device receives the SNY synchronization signal, it compares the number of data transmissions with its own number of data receptions. If the comparison result is consistent, the receiving visible light communication device determines that the communication rate is normal, and the receiving visible light communication device sends a second ACK response signal to the sending visible light communication device. When the sending visible light communication device receives the second ACK response signal at this time, it knows that the communication rate is normal, and increments the sender Normal_Reve parameter, and repeats step 3 to send the data signal for the next unit time;

[0023] When the Normal_Reve parameter increases continuously to 100, it indicates that the current communication environment is good. At this time, the sender's visible light communication device gradually increases the communication rate and puts the BAUD value corresponding to the communication rate into the SYN synchronization signal. After receiving the SYN synchronization signal, the receiver's visible light communication device parses the BAUD value, synchronously adjusts to the same communication rate and sends a second ACK response signal. After receiving the second ACK response signal, the sender's visible light communication device repeats step 3 to send the data signal for the next unit time.

[0024] If the comparison results are inconsistent, the visible light communication device on the receiving side determines that the communication rate is abnormal, and the visible light communication device on the receiving side gradually reduces the communication rate after the current unit time. Since the rate changes, the sender will not be able to receive the response signal. Therefore, after the current unit time, the sender synchronously reduces the communication rate step by step and repeats steps 2 and 3 to send the data signal for the next unit time.

[0025] Furthermore, in the data frame format of the SNY synchronization signal, the first two bits of the function field are 0x1A, and the last two bits are Send_Count values. The Send_Count field is the count value of the number of data transmissions. When the communication rate is gradually increased, the value is the BAUD value corresponding to the increased rate.

[0026] When the first two bits of the function field in the data frame format of the second ACK response signal are 0x0E, it indicates that the communication rate is normal. Under the premise of normal communication rate, the last two bits default to 0x0E. When the communication rate is gradually increased, this value corresponds to the increased rate.

[0027] Furthermore, in steps 1, 2, and 3, the visible light communication device uses a universal asynchronous receiver / transmitter (UART) combined with a direct memory access (DMA) double buffering method to receive data.

[0028] Compared with the prior art, the present invention solves the problem of not being able to correctly receive valid data segments under the interference of seabed clutter signals by using a customized communication protocol.

[0029] The present invention uses a universal asynchronous receiver / transmitter (UART) to fuse a direct memory access (DMA) algorithm, and combines it with a DMA double-buffering algorithm to solve the problem of insufficient MCU computing resources and data coverage loss caused by an overly fast transmission rate. It ensures that the MCU has sufficient computing power to perform other tasks during the communication process while also ensuring accurate and correct reception of data, thereby improving the stability of the entire communication system.

[0030] The present invention uses the MPU9250 gyroscope to monitor the attitude of the communication device node in real time, can obtain the three-dimensional attitude data of the visible light communication node in real time, and integrates the TIME timer algorithm. By integrating the sending and receiving status of the data in unit time and the attitude value of the communication node, the communication rate is dynamically adjusted to achieve communication at the best quality communication rate in different communication environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 The figure is a schematic diagram of a scenario according to an embodiment of the present invention.

[0032] Figure 2 The figure is a schematic diagram of a method flow of an embodiment of the present invention.

[0033] Figure 3 The present invention discloses an MCU and related peripheral initialization flow chart.

[0034] Figure 4 The following is a schematic diagram of the custom handshake frame and response frame format disclosed in an embodiment of the present invention, wherein (a) is the first handshake frame format, (b) is the second handshake frame format, and (c) is an ACK response frame format.

[0035] Figure 5 This is a BAUD parameter mapping communication rate correspondence table disclosed in an embodiment of the present invention.

[0036] Figure 6 This is a schematic diagram of slicing processing when the MCU disclosed in the example of the present invention obtains data from the RS485 bus.

[0037] Figure 7 A schematic diagram of the logical structure of using a DMA double buffer disclosed in an embodiment of the present invention.

[0038] Figure 8 The present invention is a flow chart of adaptively establishing a communication link during a handshake process disclosed in an embodiment of the present invention.

[0039] Fig. 9 This is a schematic diagram of the posture of a simulated visible light communication device disclosed in an embodiment of the present invention.

[0040] Fig.10 The present invention is a flow chart of an algorithm for adaptively adjusting the communication rate during a communication process disclosed in an embodiment of the present invention.

[0041] Fig.11 The diagram is a schematic diagram of a custom SYN synchronization signal frame format and an ACK response frame format disclosed in an embodiment of the present invention, wherein (a) is the SYN synchronization signal frame format, and (b) is the secondary ACK response frame format. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the solutions of the present invention, the following will describe the implementation methods of the present invention in detail in conjunction with the accompanying drawings and embodiments, so that the implementation process of how the present invention applies technical means to solve technical problems and achieve corresponding technical effects can be fully understood and implemented accordingly. The embodiments of the present invention and the various features in the embodiments can be combined with each other without conflict, and the technical solutions formed are all within the protection scope of the present invention.

[0043] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0044] It should be noted that the terms "include" and "have" in the specification and claims of the present invention and the above drawings and any modifications thereof are intended to cover non-exclusive inclusions.

[0045] like Figure 1 As shown, this embodiment discloses an underwater visible light communication device, including an MCU main control circuit, an RS485 interface circuit, a visible light source panel, an optical signal receiving device, a modulation circuit, a demodulation circuit, and an MPU9250 attitude sensor. A reference coordinate system is given at the same time. Since the visible light communication device is cylindrical, the Y-axis angle value YAngle has basically no effect on the communication. Therefore, the subsequent YAngle parameter is only judged whether it exceeds the normal angle range, wherein:

[0046] In this embodiment, the visible light communication device node A is placed in the underwater intelligent device, and the visible light communication device node B is placed in the underwater intelligent base. The underwater intelligent device needs to exchange data with the underwater intelligent base after a period of underwater operation. The underwater intelligent base is a fixed device and there is no drift problem. Since seawater has an absorption and scattering effect on visible light, the attenuation of visible light is more serious when it propagates in water. By consulting the data, it is known that there is a "transmission window" of light in seawater, that is, the attenuation coefficient of seawater for blue-green band light when propagating in seawater is the lowest, and the communication distance between visible light communication devices is generally less than or equal to 5 meters. Therefore, the visible light source used in this embodiment includes a blue light source and a green light source, specifically an LED ring array composed of 8 high-power blue and green LEDs, so as to increase the light source intensity and thus increase the communication distance.

[0047] In this embodiment, the optical signal receiving device includes a filter, a lens and a silicon photodiode.

[0048] In this embodiment, the gyroscope model is MPU9250.

[0049] In this embodiment, the MCU is connected to the external host computer through the RS-485 bus, and the MCU integrates a universal asynchronous receiver and transmitter UART, GPIO, DMA, and a timer TIME.

[0050] In this embodiment, the signal output port of the MCU is connected to the signal input port of the modulation circuit, and the signal output port of the modulation circuit is electrically connected to the control port of the driving circuit of the visible light source (in this embodiment, the LED driving circuit). The current output port of the silicon photodiode in the optical signal receiving device is connected to the signal input port of the demodulation circuit, and the voltage output port of the demodulation circuit is connected to the signal input port of the MCU. The gyroscope is connected to the signal input port of the MCU.

[0051] During the communication process, when the visible light communication device of this embodiment is used as sender A to send communication signals, the MCU processes the original data encapsulated by itself or from the host computer according to the set frame format and sends it to the modulation circuit, which is modulated into a TTL level signal of binary state "0" and "1" by the modulation circuit and input into the driving circuit of the visible light light source, thereby controlling the driving circuit to drive the visible light light source to open and close to achieve stroboscopic, thereby converting the original data into a stroboscopic signal as a communication signal sent to other visible light communication devices.

[0052] During the communication process, when the visible light communication device of this embodiment is used as the receiver B for the underwater intelligent base to receive communication signals, the stroboscopic signals sent by other visible light communication devices are received by the silicon photodiode in the optical signal receiving device, and the silicon photodiode generates a weak current and sends it to the TIA transimpedance amplifier circuit, which is then converted into a voltage signal by the TIA transimpedance amplifier circuit and amplified and sent to the AGC automatic gain circuit. Finally, the gained voltage signal is input to the threshold voltage judgment circuit to output a TTL level signal, and the TTL level signal is transmitted to the MCU acquisition pin, and the MCU restores the TTL level signal to the corresponding original data and stores it locally or uploads it to the host computer.

[0053] During the communication process, the gyroscope sensor monitors the posture of the visible light communication device in real time and transmits the posture data to the MCU. Based on the posture data, the MCU achieves the purpose of communication at the highest quality communication rate in different communication environments.

[0054] The communication method for an underwater visible light communication device described in this embodiment is as follows: Figure 2 As shown, the following steps are included:

[0055] Step 1: Figure 3 As shown, before the communication starts, the MCUs in the visible light communication devices A and B of the sender and receiver respectively initialize the universal asynchronous receiver and transmitter UART, GPIO, DMA, timer TIME, and MPU9250 gyroscope.

[0056] In addition, the MCU in the sender's visible light communication device A obtains its own posture data collected by the MPU9250 gyroscope, and uses the Kalman filter algorithm to obtain the corresponding three-dimensional angle values ​​based on its own posture data: X-axis angle value XAngle, Y-axis angle value YAngle and Z-axis angle value ZAngle.

[0057] Then, the MCU in the sender's visible light communication device A determines whether its posture meets the communication conditions based on the three three-dimensional angle data values ​​of the X-axis angle value XAngle, the Y-axis angle value YAngle, and the Z-axis angle value ZAngle. The flow chart is as follows: Figure 8 As shown, the judgment process is as follows:

[0058] When the X-axis angle value XAngle, the Y-axis angle value YAngle, and the Z-axis angle value ZAngle of a certain visible light communication device A are all consistent with the preset corresponding range values, the visible light communication device determines that its own posture meets the communication conditions. At this time, the visible light communication device A sends a handshake signal to the visible light communication device B, and the default communication rate is 115200 Bps / S, that is, the BAUD value corresponds to 0x09, 0x09, and the next step is performed;

[0059] When at least one of the X-axis angle value XAngle and the Z-axis angle value ZAngle in the sender's visible light communication device A is inconsistent with the preset corresponding setting value, the visible light communication device determines that its own posture does not meet the communication conditions. At this time, the communication rate is adjusted accordingly according to the values ​​of the X-axis angle value XAngle and the Z-axis angle value ZAngle, such as Fig. 9 As shown, taking the coordinate axis as the reference system, the posture and adjustment process of the visible light communication device A are simulated. When the angle values ​​of the X-axis angle value XAngle and the Z-axis angle value ZAngle are both less than or equal to the circular interval of 3°, communication can be carried out at the default rate, with 3° as an adjustment interval. When any of the angle values ​​of the X-axis angle value XAngle and the Z-axis angle value ZAngle is in other angle intervals and communication is impossible, the communication rate is gradually reduced to the corresponding communication rate. For example, if the sizes of the X-axis angle value XAngle and the Z-axis angle value ZAngle are 10° and 12°, the communication rate at this time should be 38400Bps / S, that is, the BAUD values ​​correspond to 0x06, 0x06, and so on. When the communication status is good, that is, communication is maintained for 100 consecutive unit times, the communication rate can be increased step by step.

[0060] Step 2: The sender visible light communication device A and the receiver visible light communication device B perform two handshakes. The process is as follows:

[0061] The sender visible light communication device A sends a first handshake signal to the receiver visible light communication device B, and the receiver visible light communication device receives the first handshake signal and sends a first ACK response signal to the sender visible light communication device. Figure 4As shown in (a), the data frame format of the first handshake signal includes a synchronization frame header SOF field, a function Function field, a communication rate BAUD field, a 0x0F data field, and a synchronization EOF frame tail field, wherein the synchronization frame header SOF field and the synchronization EOF frame tail field are the synchronization frame header and synchronization frame tail in the fixed data frame format. The function Function field indicates whether the function of the current data command is a control command or a data transmission command. At this time, the Function field is 0x11, and the 0x01 data field is a fill field. The communication rate BAUD field indicates the rate at which the current handshake process is performed. The BAUD field maps the rate value as shown in the figure. Figure 5 As shown in the figure, the initial default value is 0x09, 0x09, that is, the initial default communication rate is 115200Bps / S. Figure 4 As shown in (c), the data frame format of an ACK response signal includes a synchronous frame header SOF field, a function Function field, a 0xAA data field, and a synchronous EOF frame tail field. In this case, the Function field is 0x2F, and the 0xAA data field is a padding field.

[0062] When the handshake succeeds, the two communicating parties conduct a second handshake process. The sender visible light communication device A sends a second handshake signal to the receiver visible light communication device B. The receiver visible light communication device receives the second handshake signal and sends a handshake response signal to the sender visible light communication device. Figure 4 As shown in (b), the data frame format of the second handshake signal includes the synchronous frame header SOF field, the function field, the 0x02 data field and the synchronous EOF frame tail field. At this time, the Function field is 0x22, and the 0x02 data field is a padding field. The second handshake response signal is an ACK response signal.

[0063] After the two handshakes are successful, the sender's visible light communication device A and the receiver's visible light communication device B establish a communication link and proceed to the next step.

[0064] In this embodiment, several simple and reasonable frame formats are customized, which only contain key information in the communication process without other redundant content, and can simply and effectively build a communication link.

[0065] Step 3: The sender visible light communication device A sends a data signal to the receiver visible light communication device B, and the sender visible light communication device A and the receiver visible light communication device B start the timer TIME at the same time to start timing. During the data transmission process, the sender visible light communication device A obtains its own posture data in real time. In this embodiment, the data frame format of the data signal is as follows: Figure 6As shown in the figure, after the handshake is successful, the sender's visible light communication device will slice the data received from the host computer, that is, cut a long data into 57-byte data segments, and add the synchronization frame header SOF field, function Function field, check bit and synchronization EOF frame tail field to the data segment. At this time, the Function field value is 0x7A, indicating that this frame is a data packet, and the check bit is checked using the CheckSum check method. This check method is simple and efficient, and it is a better check method for simpler data.

[0066] During the transmission process of each unit time, the sender's visible light communication device A will detect the current device's three-dimensional posture in real time to determine whether its own posture is abnormal. Specifically, the MCU in the sender's visible light communication device A obtains the respective posture data collected by the gyroscope of the current unit time, and uses the Kalman filter algorithm to obtain the three-dimensional angle value of the current unit time based on its own posture data of the current unit time, and based on the three-dimensional angle value of the current unit time: X-axis angle value XAngle, Y-axis angle value YAngle and Z-axis angle value ZAngle, it determines whether the current unit time's own posture is abnormal. The process is as follows:

[0067] When the X-axis angle value XAngle, the Y-axis angle value YAngle, and the Z-axis angle value ZAngle of the visible light communication device A are all consistent with the preset corresponding range values, the visible light communication device determines that its own posture meets the communication conditions. At this time, the visible light communication device A sends a handshake signal to the visible light communication device B, and the default communication rate is 115200 Bps / S, that is, the BAUD value corresponds to 0x09, 0x09, and the next step is performed;

[0068] When at least one of the X-axis angle value XAngle and the Z-axis angle value ZAngle in the sender's visible light communication device A is inconsistent with the preset corresponding setting value, the visible light communication device determines that its own posture does not meet the communication conditions. At this time, the communication rate is adjusted accordingly according to the values ​​of the X-axis angle value XAngle and the Z-axis angle value ZAngle, such as Fig. 9As shown, taking the coordinate axis as the reference system, the posture and adjustment process of the visible light communication device A are simulated. When the angle values ​​of the X-axis angle value XAngle and the Z-axis angle value ZAngle are both less than or equal to the circular interval of 3°, communication can be carried out at the default rate, with 3° as an adjustment interval. When any of the angle values ​​of the X-axis angle value XAngle and the Z-axis angle value ZAngle is in other angle intervals and communication is impossible, the communication rate is gradually reduced to the corresponding communication rate. For example, if the sizes of the X-axis angle value XAngle and the Z-axis angle value ZAngle are 10° and 12°, the communication rate at this time should be 38400Bps / S, that is, the BAUD values ​​correspond to 0x06, 0x06, and so on. When the communication status is good, that is, communication is maintained for 100 consecutive unit times, the communication rate can be increased step by step.

[0069] After the sender's visible light communication device A obtains the current unit time's own posture judgment result, the sender and receiver's visible light communication devices A and B control the communication rate, such as Fig.10 As shown, the control process is as follows:

[0070] (S1) When the sending visible light communication device A determines that its own posture in the current unit time is normal, after the data signal transmission in the current unit time is completed, the sending visible light communication device A sends an SNY synchronization signal to the receiving visible light communication device B. Fig.11 As shown in (a), the data frame format of the SNY synchronization signal includes the synchronization frame header SOF field, Function field, Send_Count field, 0xAF field and EOF synchronization frame tail field. When the Function field is 0x1A, it means that this signal frame is a SYN synchronization signal frame, the Send_Count field is the count value of the number of data transmissions per unit time, and the 0xAF field is a padding field.

[0071] When the receiving visible light communication device B receives the SNY synchronization signal, it reads the value of the Send_Count field and compares the number of data transmissions contained in the SNY synchronization signal with its own data reception number Reve_Count. If the comparison result is consistent, the receiving visible light communication device B determines that the communication rate is normal, and the receiving visible light communication device B increases the communication rate and sends a second ACK response signal to the sending visible light communication device. Fig.11As shown in (b), the second ACK response signal includes the synchronization frame header SOF field, Function field, 0x0E field and EOF synchronization frame tail field, wherein when the Function field is 0x0E, it indicates that this signal frame is the second ACK response signal, and the 0x0E field is a padding field. When the sending visible light communication device A receives the second ACK response signal, the Normal_Reve parameter is incremented. If Normal_Reve increases continuously to 100, it indicates that the communication environment is good at this time, and the communication rate can be increased step by step. At the same time, the last two bits of the Function field of the SYN synchronization signal at this time become 0xFA. When the receiving end receives this data, it will synchronously increase the communication rate step by step.

[0072] If the comparison results are inconsistent, the receiving party's visible light communication device B determines that the communication rate is abnormal, and the receiving party's visible light communication device B reduces the communication rate step by step. Due to the change in the communication rate, the sending party's visible light communication device A cannot receive data within this unit time, indicating that the receiving party's state is abnormal. At this time, the sending party's visible light communication device A synchronously reduces the communication rate step by step, and repeats steps 2 and 3 to perform the data transmission process at the new communication rate.

[0073] (S2) When the visible light communication device A of the sending party determines that its own posture per unit time is abnormal, the visible light communication device A of the sending party determines which communication rate should be maintained under the current communication conditions for the most stable communication according to the three-dimensional angle value in the current posture data per unit time, and the process is as follows:

[0074] When the X-axis angle value XAngle, the Y-axis angle value YAngle, and the Z-axis angle value ZAngle of the visible light communication device A are all consistent with the preset corresponding range values, the visible light communication device determines that its own posture meets the communication conditions. At this time, the visible light communication device A sends a handshake signal to the visible light communication device B, and the default communication rate is 115200 Bps / S, that is, the BAUD value corresponds to 0x09, 0x09, and the next step is performed;

[0075] When at least one of the X-axis angle value XAngle and the Z-axis angle value ZAngle in the sender's visible light communication device A is inconsistent with the preset corresponding setting value, the visible light communication device determines that its own posture does not meet the communication conditions. At this time, the communication rate is adjusted accordingly according to the values ​​of the X-axis angle value XAngle and the Z-axis angle value ZAngle, such as Fig. 9As shown, taking the coordinate axis as the reference system, the posture and adjustment process of the visible light communication device A are simulated. When the angle values ​​of the X-axis angle value XAngle and the Z-axis angle value ZAngle are both less than or equal to the circular interval of 3°, communication can be carried out at the default rate, with 3° as an adjustment interval. When any of the angle values ​​of the X-axis angle value XAngle and the Z-axis angle value ZAngle is in other angle intervals and communication is impossible, the communication rate is gradually reduced to the corresponding communication rate. For example, if the sizes of the X-axis angle value XAngle and the Z-axis angle value ZAngle are 10° and 12°, the communication rate at this time should be 38400Bps / S, that is, the BAUD values ​​correspond to 0x06, 0x06, and so on. When the communication status is good, that is, communication is maintained for 100 consecutive unit times, the communication rate can be increased step by step.

[0076] In the above steps 1, 2, and 3 of this embodiment, the MCUs in the visible light communication devices A and B of the sender and the receiver use the universal asynchronous receiver / transmitter UART combined with the direct memory access DMA double buffering method to receive data. Specifically, when the RXBUF1 data is full of data, the pointer switches to the RXBUF2 data for data processing, and the cycle repeats. This operation allows the MCU to have enough time to process the received data, and will not cause data loss due to data overwriting caused by too fast a transmission rate. The logical structure diagram is shown in FIG. Figure 7 As shown: When preparing to receive data for the first time, the receive buffer pointer points to the RXBUF1

[64] array. After waiting for data to be received once, the DMA interrupt is triggered. At this time, the receive buffer pointer is switched to point to RXBUF2

[64] . When data reception is completed again, it is switched back to RXBUF1

[64] . At the same time, the timer is started while sending and receiving data, and the send count value Send_Count is incremented by 1 after each data is sent, and the receive count value Reve_Count is incremented after each data is received. This parameter is used when adjusting the communication parameter rate mentioned above.

[0077] In summary, this embodiment solves the problem of not being able to correctly receive valid data segments under the interference of seabed clutter signals by customizing the communication frame format. By using the universal asynchronous receiver and transmitter UART to integrate the direct memory access DMA algorithm, and combining it with the DMA double buffering algorithm, the problem of MCU computing power resources being tight and data coverage being lost due to too fast a transmission rate is solved, and the MCU has sufficient computing power to perform other tasks during the communication process while also ensuring accurate and correct data reception, thereby improving the stability of the entire communication system. By using the MPU9250 gyroscope to monitor the attitude of the optical communication device in real time, the Kalman filter algorithm is used to obtain the three-dimensional angle value of the visible light communication device in real time, and the TIME timer algorithm is integrated, the communication rate is dynamically adjusted by the sending and receiving status of the data in unit time and the attitude value of the communication node, so as to achieve communication at the best quality communication rate in different communication environments.

[0078] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. The embodiments described in the present invention are merely descriptions of the preferred embodiments of the present invention, and do not limit the concept and scope of the present invention. The various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction, and such combinations should also be regarded as the contents disclosed in the present disclosure as long as they do not violate the concept of the present invention. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations.

[0079] The present invention is not limited to the specific details of the above-mentioned embodiments. Within the technical concept of the present invention and without departing from the design concept of the present invention, various modifications and improvements made to the technical solution of the present invention by technical personnel in this field should fall within the protection scope of the present invention. The technical contents for which protection is sought in the present invention have been fully recorded in the claims.

Claims

1. An underwater visible light communication device, characterized in that: It includes an MCU main control circuit, an RS485 interface circuit, a visible light source panel, an optical signal receiving device, a modulation circuit, a demodulation circuit, and an MPU9250 attitude sensor. The MCU is electrically connected to the driving circuit control of the visible light source through the modulation circuit, the optical signal receiving device is electrically connected to the MCU signal transmission through the demodulation circuit, and the gyroscope is electrically connected to the MCU signal transmission; During the communication process, when data is transmitted, the visible light communication device receives the data information sent by the host computer through the RS485 bus, and slices and packages it into a frame containing 64 bytes of data, and controls the modulation process through the MCU to convert the TTL level signal into a binary state and input it to the control pin of the light source driving circuit, thereby controlling the on and off of the driving circuit to drive the visible light source to strobe, thereby forming a stroboscopic signal sent to other visible light communication devices as a communication signal; When receiving communication signals during the communication process, the light source will be filtered by the physical layer filter before it is received to eliminate the interference of stray light and converge to the silicon photodiode window through the lens for light source signal collection. The collected light source signal is converted into a weak current signal and transmitted to the demodulation circuit. After being restored to the original TTL level signal by the demodulation circuit, it is sent to the MCU detection pin, and the MCU restores the TTL level signal to the corresponding original data; In addition, before the communication starts, the gyroscope in the sender's visible light communication device collects its own posture data and sends it to the corresponding MCU for analysis. The MCU determines whether the posture meets the minimum communication requirements based on the posture data. If it does, it performs a handshake. If it does not, it returns a communication failure signal to the host computer through the RS485 bus and adjusts the appropriate communication rate according to the three-dimensional posture data, and resends the handshake signal after a unit of time. During the communication process, communication is carried out with the timing time set by the timer as a unit communication time period. During the data communication process, the gyroscope in the sender's visible light communication device continuously collects the posture data of the sender's visible light communication device and sends it to the corresponding MCU for analysis. If the device posture is abnormal, the MCU in the sender's visible light communication device adjusts the communication rate and resends the handshake signal after a unit time. Because the receiver will not be able to receive accurate data information after the sender's rate adjustment, the receiver will synchronously adjust the communication rate after a unit communication time period until it receives the handshake signal sent by the sender and successfully responds. At this time, the handshake process is re-performed at the adjusted rate and communication begins.

2. A communication method for an underwater visible light communication device as claimed in claim 1, characterized in that: The following steps are involved: Step 1: The sender obtains its own posture data and determines whether its own posture meets the communication conditions. If the posture of the sender's visible light communication device meets the communication conditions, the next step is performed. If the sender's visible light communication device does not meet the communication conditions, the upper computer is fed back with a communication failure status. At the same time, the sender adjusts the communication rate according to its own posture data and resends the handshake signal until the communication parties successfully shake hands and then proceed to the next step; Step 2: The visible light communication device of the sender sends a handshake signal to the visible light communication device of the receiver. The visible light communication device of the receiver receives the handshake signal and sends a response signal to the visible light communication device of the sender, thereby completing a handshake between the sender and the receiver. After the first handshake is successful, a second handshake is performed. After both handshakes are successful, it indicates that a stable communication link has been successfully established and the next step is performed. Step 3. After the handshake is successful, both parties start the timer synchronously. The time set by the timer is used as the unit time. The sender's visible light communication device sends a data signal to the receiver's visible light communication device within the unit time and counts the number of times. At the same time, the sender's visible light communication device obtains its own posture data in real time during the communication process. If the posture of the sender's visible light communication device is abnormal during the communication process, the sender's visible light communication device adjusts its own communication rate according to the three-dimensional posture data of the device. After the unit time ends, the sender's visible light communication device resends the handshake signal to the receiver's visible light communication device and repeats step 2. If the posture of the sender's visible light communication device is normal during the communication process, after the unit time, The sender's visible light communication device sends a SYN synchronization signal to the receiver's visible light communication device to confirm whether both parties can send and receive data normally during the communication process. After the receiver's visible light communication device successfully receives the SYN synchronization signal, if the data is normal, the receiver sends a secondary ACK response signal. If the sender receives the secondary ACK response signal sent by the receiver, the Normal_Reve parameter is incremented and data communication is performed for the next unit time. When Normal_Reve increases continuously and the value reaches the set parameter value, it indicates that the current communication environment is good. At this time, both parties synchronously increase the first-level communication rate and repeat step 2.

3. The communication method of the visible light communication device according to claim 2, characterized in that: In step 2, the data frame format of the first handshake signal includes a synchronization frame header SOF field, a function Function field, a communication rate BAUD field, a 0x01 data field, and a synchronization EOF frame tail field, wherein the synchronization frame header SOF field and the synchronization EOF frame tail field are the synchronization frame header and the synchronization frame tail in the fixed data frame format, the function Function field indicates whether the function of the current data command is a control command or a data transmission command, and the communication rate BAUD field indicates at what rate the current handshake process is performed; The data frame format of the second handshake signal includes a synchronous frame header SOF field, a function Function field, a 0x02 data field, and a synchronous EOF frame tail field; In step 2, the data frame format of the handshake response signal includes a synchronous frame header SOF field, a function Function field, a 0xAA data field, and a synchronous EOF frame tail field; In step 3, the communication rate BAUD field is graded by enumeration, wherein the communication rate is gradually reduced and the communication rate is gradually increased on this basis.

4. The communication method of the visible light communication device according to claim 2, characterized in that: The customized data frame format is: synchronous frame header SOF field, function Function field, payload data field, check bit and synchronous EOF frame tail field, where the check bit is checked using the CheckSum check method, and the subsequent frame format functions are different in the function Function field.

5. The communication method of the visible light communication device according to claim 2, characterized in that: The function field is a 4-byte data segment, in which the first two bytes indicate whether the current data packet is a command operation or transmitted data, and the last two bytes are valid only when the current data packet is a command operation.

6. The communication method of the visible light communication device according to claim 2, characterized in that: In step 3, when the visible light communication device of the current unit time determines that its own posture is normal in the current unit time, after the data signal of the current unit time is sent, the visible light communication device of the sending party sends an SNY synchronization signal to the visible light communication device of the receiving party, and the SNY synchronization signal includes the number of data transmissions of the visible light communication device of the sending party in the current unit time; When the receiving visible light communication device receives the SNY synchronization signal, it compares the number of data transmissions with its own number of data receptions. If the comparison result is consistent, the receiving visible light communication device determines that the communication rate is normal, and the receiving visible light communication device sends a second ACK response signal to the sending visible light communication device. When the sending visible light communication device receives the second ACK response signal at this time, it knows that the communication rate is normal, and increments the sender Normal_Reve parameter, and repeats step 3 to send the data signal for the next unit time; When the Normal_Reve parameter increases continuously to 100, it indicates that the current communication environment is good. At this time, the sender's visible light communication device gradually increases the communication rate and puts the BAUD value corresponding to the communication rate into the SYN synchronization signal. After receiving the SYN synchronization signal, the receiver's visible light communication device parses the BAUD value, synchronously adjusts to the same communication rate and sends a second ACK response signal. After receiving the second ACK response signal, the sender's visible light communication device repeats step 3 to send the data signal for the next unit time. If the comparison results are inconsistent, the visible light communication device on the receiving side determines that the communication rate is abnormal, and the visible light communication device on the receiving side gradually reduces the communication rate after the current unit time. Since the rate changes, the sender will not be able to receive the response signal. Therefore, after the current unit time, the sender synchronously reduces the communication rate step by step and repeats steps 2 and 3 to send the data signal for the next unit time.

7. The communication method of the visible light communication device according to claim 6, characterized in that: In the data frame format of the SNY synchronization signal, the first two bits of the function field are 0x1A, and the last two bits are Send_Count values. The Send_Count field is the count value of the number of data transmissions. When the communication rate is gradually increased, the value is the BAUD value corresponding to the increased rate. When the first two bits of the function field in the data frame format of the second ACK response signal are 0x0E, it indicates that the communication rate is normal. Under the premise of normal communication rate, the last two bits default to 0x0E. When the communication rate is gradually increased, this value corresponds to the increased rate.

8. The communication method of the visible light communication device according to claim 7, characterized in that: In steps 1, 2, and 3, the visible light communication device uses a universal asynchronous receiver / transmitter (UART) combined with a direct memory access (DMA) double buffering method to receive data.

Citation Information

Patent Citations

  • Mechanism and method for establishing acousto-optic fused underwater communication link

    CN108471328A

  • Underwater wireless optical communication method and system

    CN112291019A