Wireless optical communication tracking system, method and computer program product

By integrating a target preset position identification unit and a turntable control unit into a programmable logic component in a wireless optical communication system, the problem of optical signal offset and loss in the wireless optical communication system is solved, achieving miniaturized, high-speed, and high-precision tracking and aiming effects.

CN120881241APending Publication Date: 2025-10-31PURPLE MOUNTAIN LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510933144.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

In wireless optical communication systems, vibrations and free-space interference at the transmitting or receiving end can cause optical signals to deviate or be lost, affecting the smooth operation of the communication link. Existing tracking and aiming systems are bulky and have slow response speeds, making it difficult to achieve high-precision tracking and aiming.

Method used

The system employs a target preset position recognition unit and a turntable control unit integrated on a programmable logic component. It acquires target images through an image acquisition device, identifies the preset position of the target pattern, and generates a rotation control signal for the two-dimensional turntable to achieve target tracking and reduce reliance on host computer and turntable controller equipment.

Benefits of technology

A miniaturized tracking and aiming system has been achieved, reducing costs and size while improving tracking and aiming accuracy and response speed. The image processing latency per frame is controlled within 20ms, enabling rapid target tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120881241A_ABST
    Figure CN120881241A_ABST
Patent Text Reader

Abstract

The invention relates to a wireless optical communication tracking and pointing system and method and a computer program product. The system is arranged at a first end of the wireless optical communication system, the wireless optical communication system further comprises a second end, the first end and the second end carry out wireless optical communication, and the system comprises an image acquisition device used for acquiring a current frame target image of the second end; the programmable logic component is integrated with a target preset position identification unit and a rotary table control unit, and the target preset position identification unit is used for identifying coordinates of a preset position of a target pattern in a current frame of target image; the turntable control unit is used for comparing the coordinates of the preset position of the target pattern in the current frame of target image with the coordinates of the preset position of the target pattern in the previous frame of target image, and generating a rotation control signal of the two-dimensional turntable; and the two-dimensional turntable is used for rotating according to the rotation control signal so as to point to the preset position of the target pattern in the target image of the current frame and realize tracking and pointing of the second end. The size of the tracking and pointing system can be reduced by adopting the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless optical communication technology, and in particular to a wireless optical communication tracking system, method and computer program product. Background Technology

[0002] A wireless optical communication system consists of a transmitter and a receiver. The transmitter modulates and encodes the data to be transmitted into an optical signal, which is then transmitted to the receiver via free space. Factors such as vibrations at the transmitter or receiver and uncertain interference in free space can cause optical signal drift and loss, leading to communication link interruptions and affecting communication quality. Therefore, tracking wireless optical communication systems are necessary to ensure uninterrupted communication.

[0003] In related technologies, a tracking and aiming system is used to track and aim at a wireless optical communication system. This system uses a host computer to process digital image signals to obtain the target's position information, and then uses a turntable controller to control the turntable's rotation to achieve target tracking and aiming. However, both the host computer and the turntable controller are relatively large, resulting in a large tracking and aiming system overall. Summary of the Invention

[0004] Therefore, it is necessary to provide a wireless optical communication tracking system, method, and computer program product that can reduce the size of the tracking system in order to address the above-mentioned technical problems.

[0005] In a first aspect, this application provides a wireless optical communication tracking system. The system is located at a first end of the wireless optical communication system, which also includes a second end. The first end and the second end communicate wirelessly. The system includes:

[0006] An image acquisition device is used to acquire the current frame target image at the second end;

[0007] The programmable logic component integrates a target preset position recognition unit and a turntable control unit. The target preset position recognition unit is used to identify the coordinates of the preset position of the target pattern in the current frame target image. The turntable control unit is used to compare the coordinates of the preset position of the target pattern in the current frame target image with the coordinates of the preset position of the target pattern in the previous frame target image to generate a rotation control signal for the two-dimensional turntable.

[0008] A two-dimensional turntable is used to rotate according to a rotation control signal to point to a preset position of the target pattern in the current frame target image, so as to achieve tracking aiming at the second end.

[0009] In one embodiment, the target preset position recognition unit is further configured to cross-correlate the current frame target image with the template target image to obtain a cross-correlation result; when it is determined from the cross-correlation result that the current frame target image contains a target pattern in the template target image, the unit identifies the coordinates of the preset position of the target pattern in the current frame target image and inputs the coordinates of the preset position of the target pattern in the current frame target image to the turntable control unit.

[0010] In one embodiment, the turntable control unit is further configured to compare the coordinates of a preset position of the target pattern in the current frame target image with the coordinates of a preset position of the target pattern in the previous frame target image to determine the rotation attitude of the two-dimensional turntable, the rotation attitude including the rotation direction and the rotation angle; generate a rotation direction control signal of the two-dimensional turntable according to the rotation direction of the two-dimensional turntable, and generate a rotation angle control signal of the two-dimensional turntable according to the rotation angle of the two-dimensional turntable.

[0011] In one embodiment, the turntable control unit is further configured to determine the number of rotation steps of the two-dimensional turntable based on the rotation angle of the two-dimensional turntable and the motor step angle of the two-dimensional turntable; generate a pulse drive signal for the two-dimensional turntable based on the number of rotation steps of the two-dimensional turntable and the configuration information of the register in the turntable control unit, and use the pulse drive signal as a rotation angle control signal.

[0012] In one embodiment, the configuration information of the registers in the turntable control unit includes the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, with each pulse corresponding to one rotation step;

[0013] The turntable control unit includes:

[0014] A state machine is used to determine the number of pulses generated by the state machine in the rising state when the rotation step number of the two-dimensional turntable is greater than the sum of the maximum number of pulses in the rising state and the maximum number of pulses in the falling state. The difference between the rotation step number of the two-dimensional turntable and the sum of the maximum number of pulses in the rising and falling states is determined as the number of pulses generated by the state machine in the steady state, and the maximum number of pulses in the falling state is determined as the number of pulses generated by the state machine in the falling state. Based on the number of pulses generated by the state machine in the rising state, the steady state, and the falling state, pulse drive signals for the two-dimensional turntable are generated.

[0015] In one embodiment, the configuration information of the registers in the turntable control unit includes the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, with each pulse corresponding to one rotation step;

[0016] The turntable control unit includes:

[0017] A state machine is used to determine the number of rotation steps of the two-dimensional turntable as the number of pulses generated by the state machine in the rising state when the number of rotation steps of the two-dimensional turntable is less than or equal to the maximum number of pulses in the rising state, and to generate the pulse drive signal of the two-dimensional turntable based on the number of pulses generated by the state machine in the rising state.

[0018] In one embodiment, the configuration information of the registers in the turntable control unit includes the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, with each pulse corresponding to one rotation step;

[0019] The turntable control unit includes:

[0020] The state machine is used to determine the maximum number of pulses generated by the state machine in the rising state when the rotation step number of the two-dimensional turntable is greater than the maximum number of pulses in the rising state, and less than or equal to the sum of the maximum number of pulses in the rising state and the maximum number of pulses in the falling state. The difference between the rotation step number of the two-dimensional turntable and the maximum number of pulses in the rising state is determined as the number of pulses generated by the state machine in the falling state. The pulse drive signal of the two-dimensional turntable is generated based on the number of pulses generated by the state machine in the rising state and the number of pulses generated by the state machine in the falling state.

[0021] In one embodiment, the system further includes:

[0022] The two-dimensional turntable drive device includes a signal amplification circuit and a motor drive circuit. The signal amplification circuit amplifies the rotation control signal and inputs the amplified rotation control signal to the motor drive circuit. The motor drive circuit generates a motor drive signal based on the amplified rotation control signal and sends the motor drive signal to the two-dimensional turntable.

[0023] The two-dimensional turntable is also used to rotate according to the motor drive signal in order to achieve tracking and aiming at the second end.

[0024] In one embodiment, the rotation control signal includes a rotation direction control signal and a rotation angle control signal of the two-dimensional turntable. The rotation direction control signal of the two-dimensional turntable includes a rotation direction control signal of the X-axis and a rotation direction control signal of the Y-axis. The rotation angle control signal of the two-dimensional turntable includes a rotation angle control signal of the X-axis and a rotation angle control signal of the Y-axis.

[0025] The signal amplification circuit includes four amplification links, each used to amplify a control signal. Each link includes an input terminal, transistors T1 and T2, resistors R1 and R2, diode D1, a power supply connection terminal, and an output terminal. The input terminal is connected to the output terminal of the turntable control unit and to the base of transistor T1. The collector of transistor T1 is connected to the collector of transistor T2 and to the output terminal. The emitter of transistor T1 is connected to the base of transistor T2. The collector of transistor T2 is connected to the anode of diode D1. The emitter of transistor T2 is grounded. The base of transistor T1 is connected to the emitter of transistor T1 through resistor R1, and the base of transistor T2 is connected to the emitter of transistor T2 through resistor R2. Resistors R1 and R2 are connected. The cathode of diode D1 is connected to the power supply connection terminal. The output terminal is connected to the input terminal of the motor drive circuit.

[0026] Secondly, this application also provides a wireless optical communication tracking method, applied to the wireless optical communication tracking system of the first aspect described above, comprising:

[0027] Obtain the target image of the current frame from the second end;

[0028] Identify the coordinates of a preset position of the target pattern in the current frame target image;

[0029] The coordinates of the preset position of the target pattern in the current frame target image are compared with the coordinates of the preset position of the target pattern in the previous frame target image to generate a rotation control signal for the two-dimensional turntable.

[0030] The rotation control signal controls the two-dimensional turntable to rotate, pointing to the preset position of the target pattern in the current frame target image, thereby achieving tracking aiming at the second end.

[0031] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0032] Obtain the target image of the current frame from the second end;

[0033] Identify the coordinates of a preset position of the target pattern in the current frame target image;

[0034] The coordinates of the preset position of the target pattern in the current frame target image are compared with the coordinates of the preset position of the target pattern in the previous frame target image to generate a rotation control signal for the two-dimensional turntable.

[0035] The rotation control signal controls the two-dimensional turntable to rotate, pointing to the preset position of the target pattern in the current frame target image, thereby achieving tracking aiming at the second end.

[0036] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0037] Obtain the target image of the current frame from the second end;

[0038] Identify the coordinates of a preset position of the target pattern in the current frame target image;

[0039] The coordinates of the preset position of the target pattern in the current frame target image are compared with the coordinates of the preset position of the target pattern in the previous frame target image to generate a rotation control signal for the two-dimensional turntable.

[0040] The rotation control signal controls the two-dimensional turntable to rotate, pointing to the preset position of the target pattern in the current frame target image, thereby achieving tracking aiming at the second end.

[0041] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0042] Obtain the target image of the current frame from the second end;

[0043] Identify the coordinates of a preset position of the target pattern in the current frame target image;

[0044] The coordinates of the preset position of the target pattern in the current frame target image are compared with the coordinates of the preset position of the target pattern in the previous frame target image to generate a rotation control signal for the two-dimensional turntable.

[0045] The rotation control signal controls the two-dimensional turntable to rotate, pointing to the preset position of the target pattern in the current frame target image, thereby achieving tracking aiming at the second end.

[0046] The aforementioned wireless optical communication tracking system, method, computer equipment, storage medium, and computer program integrate the target preset position recognition unit and the turntable control unit onto a programmable logic component. This eliminates the need for a separate turntable controller and a host computer, significantly reducing the size and cost of the tracking system. By integrating the image processing function of the target preset position recognition unit and the turntable control function of the turntable control unit onto the programmable logic component, the processing latency for each frame can be controlled to within 20ms, meaning one tracking operation can be completed in 20ms. This is faster and has less latency compared to implementing this on a host computer. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is a schematic diagram of the structure of a wireless optical communication tracking system in one embodiment;

[0049] Figure 2 This is a schematic diagram of the first state machine in one embodiment;

[0050] Figure 3 This is a schematic diagram of each amplification link in a signal amplification circuit in one embodiment;

[0051] Figure 4 This is a schematic diagram of the wireless optical communication tracking system in another embodiment;

[0052] Figure 5 This is a schematic diagram of the wireless optical communication tracking process in one embodiment;

[0053] Figure 6 This is an internal structural diagram of a computer device in one embodiment.

[0054] Explanation of reference numerals in the attached figures:

[0055] 102. Image acquisition device; 104. Programmable logic component; 106. Two-dimensional turntable; 108. Two-dimensional turntable drive device; 110. Configuration port; 1042. Target preset position recognition unit; 1044. Turntable control unit; 1046. Industrial camera communication interface; 1062. First turntable; 1064. Second turntable; 1082. Signal amplification circuit; 1084. Motor drive circuit. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0057] A wireless optical communication system consists of a transmitter and a receiver. The transmitter modulates and encodes the data to be transmitted into an optical signal, which is then transmitted to the receiver via free space. Factors such as vibrations at the transmitter or receiver and uncertain interference in free space can cause optical signal drift and loss, leading to communication link interruptions and affecting communication quality. Therefore, tracking wireless optical communication systems are necessary to ensure uninterrupted communication.

[0058] In related technologies, a tracking system is used to track and aim a wireless optical communication system. This system acquires digital image signals of the target using a camera, processes these signals using a host computer to obtain the target's position information, and then controls the rotation of a two-dimensional turntable using a turntable controller to achieve target tracking. However, both the host computer and the turntable controller are relatively large, hindering integration and resulting in a bulky tracking system. Furthermore, the host computer has a slow response time, processing approximately 100ms at a time, making it easy to lose track of rapidly moving targets. Additionally, the camera uses a 1GE Ethernet interface and a USB 2.0 interface, which lacks sufficient bandwidth and results in low tracking accuracy.

[0059] Therefore, in order to solve the above-mentioned technical problems, a wireless optical communication tracking system is proposed.

[0060] In one exemplary embodiment, such as Figure 1 As shown, a wireless optical communication tracking system is provided. This system is located at a first end of the wireless optical communication system, which also includes a second end. The first end and the second end communicate wirelessly. The first end refers to the communication end capable of transmitting signals. The second end refers to the target being tracked by the wireless optical communication tracking system. During wireless optical communication, the target may move or jitter, causing communication link interruptions and affecting communication quality. For example, the first end can be a transmitter or a receiver, and correspondingly, the second end can be a receiver or a transmitter. It is understood that each of the first and second ends can be equipped with a separate wireless optical communication tracking system, which operates independently and without affecting each other.

[0061] The wireless optical communication tracking system includes an image acquisition device 102, a programmable logic component 104, and a two-dimensional turntable 106. The programmable logic component 104 integrates a target preset position recognition unit 1042 and a turntable control unit 1044, wherein:

[0062] Image acquisition device 102 is used to acquire the current frame target image of the second end.

[0063] The programmable logic component 104 integrates a target preset position recognition unit 1042 and a turntable control unit 1044. The target preset position recognition unit 1042 is used to identify the coordinates of the preset position of the target pattern in the current frame target image. The turntable control unit 1044 is used to compare the coordinates of the preset position of the target pattern in the current frame target image with the coordinates of the preset position of the target pattern in the previous frame target image to generate a rotation control signal for the two-dimensional turntable 106.

[0064] The two-dimensional turntable 106 is used to rotate according to the rotation control signal to point to the preset position of the target pattern in the target image of the current frame, so as to realize the tracking aiming of the second end.

[0065] For example, the image acquisition device 102 is used to acquire the current frame target image of the second end during wireless optical communication and send the current frame target image to the programmable logic component 104. The second end has a fixed target pattern, and the current frame target image refers to the image obtained by the image acquisition device 102 capturing the target pattern. For example, the target pattern can be any shape such as a circle or a square.

[0066] The Field Programmable Gate Array (FPGA) 104 integrates a target preset position recognition unit 1042 and a turntable control unit 1044. The target preset position recognition unit 1042 receives the target image of the current frame, identifies the coordinates of the preset position of the target pattern in the current frame image, and sends the coordinates of the preset position of the target pattern in the current frame image to the turntable control unit 1044. The preset position of the target pattern refers to the pre-set pattern position in the target pattern used to detect changes in the second end's position and attitude. For example, the preset position of the target pattern can be an edge point, center point, corner point, etc., in the target pattern. The coordinates of the preset position of the target pattern refer to the coordinates of the preset position in the current frame image, which can be denoted as (x1, y1). The turntable control unit 1044 obtains the coordinates of the preset position of the target pattern in the previous frame image.

[0067] The coordinates of the preset position of the target pattern in the current frame target image are compared with the coordinates of the preset position of the target pattern in the previous frame target image to calculate the rotation attitude of the two-dimensional turntable 106. A rotation control signal for the two-dimensional turntable 106 is generated based on the rotation attitude and sent to the two-dimensional turntable 106. Since the coordinates of the preset position of the target pattern in the current frame target image are different from those in the previous frame target image, it indicates that the position and attitude of the second end have changed. Therefore, the two-dimensional turntable 106 needs to be rotated to point to the preset position of the target pattern in the current frame target image. The rotation attitude of the two-dimensional turntable 106 refers to the direction and angle of rotation required to point the two-dimensional turntable 106 to the preset position of the target pattern in the current frame target image.

[0068] The two-dimensional turntable 106 is used to receive rotation control signals from the two-dimensional turntable 106. Based on the rotation control signals, the turntable rotates in the corresponding direction and angle to track and point to a preset position of the target pattern in the current frame target image, thereby achieving tracking and aiming at the second end. After rotation, the two-dimensional turntable 106 has pointed to the preset position of the target pattern in the current frame target image. This tracking and aiming is completed, and the image acquisition device 102 continues to acquire the next frame target image from the second end for the next tracking and aiming.

[0069] Furthermore, the two-dimensional turntable 106 includes a first turntable and a second turntable. The rotational attitude of the two-dimensional turntable 106 includes the rotational attitude along the X-axis and the rotational attitude along the Y-axis, which are respectively completed by the first turntable and the second turntable. When both the first turntable and the second turntable have completed their rotation, the tracking aiming is completed.

[0070] Furthermore, the programmable logic component 104 also includes an industrial camera communication interface (CAMLINK interface). The CAMLINK interface is used to receive the current frame target image from the second end and parse the current frame target image into a current frame color image. The current frame color image is represented as RGB three-channel 24-bit data. The current frame color image is input to the target preset position recognition unit 1042, which is used to identify the coordinates of the preset position of the target pattern in the current frame color image. The turntable control unit 1044 is used to compare the coordinates of the preset position of the target pattern in the current frame color image with the coordinates of the preset position of the target pattern in the previous frame color image, and generate a rotation control signal for the two-dimensional turntable 106. The two-dimensional turntable 106 is used to rotate according to the rotation control signal to point to the preset position of the target pattern in the current frame color image, thereby realizing tracking and aiming at the second end. The CAMLINK interface lays the foundation for subsequent image processing, recognition, and analysis by converting the acquired raw current frame target image into a displayable, processable, and analyzable color image format. The CAMLINK interface supports speeds from 2Gbps to 5Gbps, which provides greater bandwidth compared to interfaces using 1GE Ethernet and USB 2.0 interfaces. It supports higher frame rates and resolution images, which helps improve tracking accuracy.

[0071] In this embodiment, the target preset position recognition unit 1042 and the turntable control unit 1044 are both integrated onto the programmable logic component 104, eliminating the need for a separate turntable controller and a host computer, thus significantly reducing the size and cost of the tracking and aiming system. By integrating the image processing function of the target preset position recognition unit 1042 and the turntable control function of the turntable control unit 1044 onto the programmable logic component 104, the processing delay for each frame of image can be controlled within 20ms, meaning that one tracking and aiming operation can be completed in 20ms. This is faster and has less latency compared to implementing it on a host computer.

[0072] In an exemplary embodiment, the target preset position recognition unit 1042 is further configured to cross-correlate the current frame target image with the template target image to obtain a cross-correlation result; when it is determined from the cross-correlation result that the target pattern in the current frame target image is the same as the target pattern in the template target image, the coordinates of the preset position of the target pattern in the current frame target image are identified, and the coordinates of the preset position of the target pattern in the current frame target image are input to the turntable control unit 1044.

[0073] The target preset position recognition unit 1042 is also used to acquire a template target image through a target preset position recognition algorithm. The template target image is used to identify whether the current frame target image contains a target pattern. The current frame target image and the template target image are cross-correlated to obtain a cross-correlation result. Cross-correlation refers to sliding the template target image on the current frame target image, calculating a correlation score for each position, and comparing the maximum correlation score with a threshold to obtain a cross-correlation result. If the cross-correlation result shows that the maximum correlation score is greater than or equal to the threshold, it indicates that the current frame target image contains the target pattern in the template target image. If the cross-correlation result shows that the maximum correlation score is less than the threshold, it indicates that the current frame target image does not contain the target pattern in the template target image. When it is determined that the current frame target image contains the target pattern in the template target image based on the cross-correlation result, the coordinates of the preset position of the target pattern in the current frame target image are identified, and the coordinates of the preset position of the target pattern in the current frame target image are input to the turntable control unit 1044.

[0074] In this embodiment, the target preset position recognition unit 1042 first performs cross-correlation between the current frame target image and the template target image using a target preset position recognition algorithm. This enables it to quickly identify whether the current frame target image contains the target pattern in the template target image. When the current frame target image contains the target pattern in the template target image, the target preset position recognition algorithm identifies the coordinates of the preset position of the target pattern in the current frame target image. This allows for high-precision and rapid target pattern preset position localization using target patterns with well-defined structures and stable geometric features.

[0075] In an exemplary embodiment, the turntable control unit 1044 is further configured to compare the coordinates of a preset position of the target pattern in the current frame target image with the coordinates of a preset position of the target pattern in the previous frame target image to determine the rotation attitude of the two-dimensional turntable 106, the rotation attitude including the rotation direction and the rotation angle; generate a rotation direction control signal of the two-dimensional turntable 106 according to the rotation direction of the two-dimensional turntable 106, and generate a rotation angle control signal of the two-dimensional turntable 106 according to the rotation angle of the two-dimensional turntable 106.

[0076] The turntable control unit 1044 is also used to receive the coordinates of a preset position of the target pattern in the current frame target image, compare the coordinates of the preset position of the target pattern in the current frame target image with the coordinates of the preset position of the target pattern in the previous frame target image, and determine the rotation attitude of the two-dimensional turntable 106. The rotation attitude includes the rotation direction and the rotation angle. The formula for calculating the rotation angle of the two-dimensional turntable 106 is as follows:

[0077]

[0078]

[0079] Among them, (x1, y1) represents the coordinates of the preset position of the target pattern in the current frame target image; (x0, y0) represents the coordinates of the preset position of the target pattern in the previous frame target image; fov represents the field of view angle of the image acquisition device 102, which is a fixed known parameter; pixel represents the image pixel, and each image acquisition device 102 supports different pixels, which is a known parameter; angle_x and angle_y respectively represent the rotation angles of the X-axis and Y-axis of the two-dimensional turntable 106.

[0080] When x1 > x0, it is determined that the rotation direction of the X-axis of the two-dimensional turntable 106 is clockwise rotation, and the rotation angle is angle_x; when x1 < x0, it is determined that the rotation direction of the X-axis of the two-dimensional turntable 106 is counterclockwise rotation, and the rotation angle is angle_x; when y1 > y0, it is determined that the rotation direction of the Y-axis of the two-dimensional turntable 106 is clockwise rotation, and the rotation angle is angle_y; when y1 < y0, it is determined that the rotation direction of the Y-axis of the two-dimensional turntable 106 is counterclockwise rotation, and the rotation angle is angle_y.

[0081] Generate a rotation direction control signal for the two-dimensional turntable 106 according to the rotation direction of the two-dimensional turntable 106, and generate a rotation angle control signal for the two-dimensional turntable 106 according to the rotation angle of the two-dimensional turntable 106. Since the two-dimensional turntable 106 has been decomposed into X-axis and Y-axis rotations, and there are only two rotation directions, counterclockwise rotation and clockwise rotation, in the X-axis and Y-axis directions, the rotation direction control signal is represented by a 1-bit signal, 0 represents counterclockwise rotation, 1 represents clockwise rotation, and the rotation direction control signals of the X-axis and Y-axis of the two-dimensional turntable 106 are respectively denoted as dir_x and dir_y. Exemplarily, when x1 > x0, dir_x = 1; when x1 < x0, dir_x = 0; when y1 > y0, dir_y = 1; when y1 < y0, dir_y = 0.

[0082] The turntable control unit 1044 is further configured to output the rotation direction control signal and the rotation angle control signal to the two-dimensional turntable 106 for controlling the rotation directions of the first turntable and the second turntable in the two-dimensional turntable 106.

[0083] In this embodiment, the turntable control unit 1044 in the programmable logic component 104 is used to compare the coordinates of the preset position of the target pattern in the current frame target image with the coordinates of the preset position of the target pattern in the previous frame target image to determine the rotation direction and rotation angle of the two-dimensional turntable 106. Since the image coordinates can achieve sub-pixel level accuracy, it can finely perceive the small changes in the rotation angle. By comparing the coordinates of the preset position to determine the rotation direction and rotation angle of the two-dimensional turntable 106, the accuracy of the rotation direction and rotation angle of the two-dimensional turntable 106 can be improved.

[0084] The process of generating the rotation angle control signal for the two-dimensional turntable 106 by the turntable control unit 1044 is described below. In an exemplary embodiment, the turntable control unit 1044 is further configured to determine the number of rotation steps of the two-dimensional turntable 106 based on the rotation angle and the motor step angle of the two-dimensional turntable 106; generate a pulse drive signal for the two-dimensional turntable 106 based on the number of rotation steps and the configuration data of the registers in the two-dimensional turntable 106, and use the pulse drive signal as the rotation angle control signal.

[0085] The turntable control unit 1044 is also used to acquire the motor step angle of the two-dimensional turntable 106. The motor step angle refers to the step angle of the stepper motor of the two-dimensional turntable 106. Each stepper motor has a specific step angle, which represents the rotation angle corresponding to one step of the stepper motor. Therefore, the number of rotation steps of the two-dimensional turntable 106, i.e., the number of rotation steps of the stepper motor of the two-dimensional turntable 106, can be determined based on the ratio of the rotation angle of the first turntable in the two-dimensional turntable 106 to the motor step angle. Specifically, the number of rotation steps of the first turntable in the two-dimensional turntable 106 is determined based on the ratio of the rotation angle of the first turntable to the motor step angle, and the number of rotation steps of the second turntable in the two-dimensional turntable 106 is determined based on the rotation angle of the second turntable and the motor step angle. The number of rotation steps of the first turntable and the number of rotation steps of the second turntable are denoted as step_num_x and step_num_y, respectively.

[0086] Furthermore, the wireless optical communication tracking system also includes a configuration port, which is used to configure the values ​​of the registers in the turntable control unit 1044 to obtain the register configuration information. The turntable control unit 1044 also includes a state machine, which is controlled by registers and used to control the operation of the two-dimensional turntable 106. The state machine includes four states: idle state, rising state, steady state, and falling state. The rotation step number of the two-dimensional turntable 106 is compared with the configuration information in the registers. Based on the comparison result, the number of pulses generated by the state machine in different states is determined. Based on the number of pulses generated by the state machine in different states, a pulse drive signal for the two-dimensional turntable 106 is generated, and the pulse drive signal is used as the rotation angle control signal.

[0087] In this embodiment, the turntable control unit 1044 determines the rotation step number of the two-dimensional turntable 106 based on its rotation angle and motor step angle, thus converting the rotation angle into a number of rotation steps and enabling precise control of the rotation angle of the two-dimensional turntable 106. Based on the rotation step number of the two-dimensional turntable 106 and the configuration information of the registers in the turntable control unit 1044, a pulse drive signal for the two-dimensional turntable 106 is generated. This allows for precise control of the two-dimensional turntable 106 to generate pulse waveforms according to the pulse drive signal, ensuring accurate rotation of the two-dimensional turntable 106.

[0088] In one optional embodiment of the above, the configuration information of the register in the turntable control unit 1044 includes the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, with each pulse corresponding to one rotation step;

[0089] The turntable control unit 1044 includes:

[0090] The state machine is used to determine the maximum number of pulses generated by the state machine in the rising state when the rotation step number of the two-dimensional turntable 106 is greater than the sum of the maximum number of pulses in the rising state and the maximum number of pulses in the falling state; to determine the difference between the rotation step number of the two-dimensional turntable 106 and the sum of the maximum number of pulses in the rising state and the maximum number of pulses in the falling state as the number of pulses generated by the state machine in the steady state; and to determine the maximum number of pulses generated by the state machine in the falling state as the number of pulses generated by the state machine in the falling state. The pulse drive signal for the two-dimensional turntable 106 is generated based on the number of pulses generated by the state machine in the rising state, the number of pulses generated by the state machine in the steady state, and the number of pulses generated by the state machine in the falling state.

[0091] The maximum number of pulses in the rising state refers to the maximum number of pulses that the pre-configured state machine can generate in the rising state, and the maximum number of pulses in the falling state refers to the maximum number of pulses that the pre-configured state machine can generate in the falling state. Each pulse generated by the state machine controls the stepper motor to rotate one rotational step.

[0092] The state machine includes four states: idle, rising, stationary, and falling. In the idle state, the stepper motor is not running. In the rising state, the stepper motor starts rotating, and the pulse frequency of the state machine increases. In the stationary state, the pulse frequency remains constant, and in the falling state, the pulse frequency decreases.

[0093] The state machine determines whether the rotation step count of the two-dimensional turntable 106 is greater than zero. If it is, it transitions from the idle state to the rising state. It also determines whether the rotation step count of the two-dimensional turntable 106 is greater than the sum of the maximum pulse count in the rising state and the maximum pulse count in the falling state. If so, the state machine sequentially passes through the rising state, the stable state, and the falling state. The number of pulses generated by the state machine in the rising state is the maximum number of pulses in the rising state. The number of pulses generated by the state machine in the stable state is the difference between the rotation step count of the two-dimensional turntable 106 and the sum of the maximum pulse counts in the rising and falling states. The number of pulses generated by the state machine in the falling state is the maximum number of pulses in the falling state. Based on the number of pulses generated by the state machine in the rising state, the stable state, and the falling state, pulse drive signals for the two-dimensional turntable 106 are generated. These pulse drive signals are represented as stepper motor motion curves. The pulse drive signal is sent to the two-dimensional turntable 106 as the rotation angle control signal to control the two-dimensional turntable 106 to rotate. After the rotation is completed, the state machine jumps from the descent state to the idle state, indicating that the tracking and aiming is over.

[0094] In this embodiment, by designing a unique state machine for the turntable control unit 1044, it is possible to generate pulse drive signals corresponding to the rotation step number of the two-dimensional turntable 106, thereby improving the rotational stability of the motor.

[0095] In another optional embodiment described above, the configuration information of the registers in the turntable control unit 1044 includes the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, with each pulse corresponding to one rotation step.

[0096] The turntable control unit 1044 includes:

[0097] The state machine is used to determine the number of rotation steps of the two-dimensional turntable 106 as the number of pulses generated by the state machine in the rising state when the number of rotation steps of the two-dimensional turntable 106 is less than or equal to the maximum number of pulses in the rising state, and to generate the pulse drive signal of the two-dimensional turntable 106 according to the number of pulses generated by the state machine in the rising state.

[0098] Optionally, the state machine is used to determine whether the rotation step number of the two-dimensional turntable 106 is greater than zero. If it is greater than zero, it jumps from the idle state to the rising state. It also determines whether the rotation step number of the two-dimensional turntable 106 is less than or equal to the maximum number of pulses in the rising state. If the rotation step number of the two-dimensional turntable 106 is less than or equal to the maximum number of pulses in the rising state, the state machine will only go through the rising state. The number of pulses generated by the state machine in the rising state is the rotation step number of the two-dimensional turntable 106. A pulse drive signal for the two-dimensional turntable 106 is generated based on the number of pulses generated by the state machine in the rising state. This pulse drive signal is sent to the two-dimensional turntable 106 as a rotation angle control signal to control the rotation of the two-dimensional turntable 106. After the rotation is completed, the state machine jumps from the rising state to the idle state, indicating that the current tracking and aiming is finished.

[0099] In this embodiment, by designing a unique state machine for the turntable control unit 1044, different pulse drive signals can be generated according to the rotation step number of the two-dimensional turntable 106, which can improve the rotation stability of the motor.

[0100] In another optional embodiment described above, the configuration information of the registers in the turntable control unit 1044 includes the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, with each pulse corresponding to one rotation step.

[0101] The turntable control unit 1044 includes:

[0102] The state machine is used to determine the maximum number of pulses generated by the state machine in the rising state when the rotation step number of the two-dimensional turntable 106 is greater than the maximum number of pulses in the rising state, and less than or equal to the sum of the maximum number of pulses in the rising state and the maximum number of pulses in the falling state. The difference between the rotation step number of the two-dimensional turntable 106 and the maximum number of pulses in the rising state is determined as the number of pulses generated by the state machine in the falling state. The pulse drive signal of the two-dimensional turntable 106 is generated based on the number of pulses generated by the state machine in the rising state and the number of pulses generated by the state machine in the falling state.

[0103] Optionally, the state machine is used to determine whether the rotation step number of the two-dimensional turntable 106 is greater than zero. If it is greater than zero, it jumps from the idle state to the rising state. It also determines whether the rotation step number of the two-dimensional turntable 106 is greater than the maximum number of pulses in the rising state, and less than or equal to the sum of the maximum number of pulses in the rising state and the maximum number of pulses in the falling state. If the rotation step number of the two-dimensional turntable 106 is greater than the maximum number of pulses in the rising state, and less than or equal to the sum of the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, then the state machine needs to sequentially pass through the rising and falling states. The number of pulses generated by the state machine in the rising state is the maximum number of pulses in the rising state, and the number of pulses generated by the state machine in the falling state is the difference between the rotation step number of the two-dimensional turntable 106 and the maximum number of pulses in the rising state. The pulse drive signal for the two-dimensional turntable 106 is generated based on the number of pulses generated by the state machine in the rising and falling states. The pulse drive signal is sent to the two-dimensional turntable 106 as the rotation angle control signal to control the two-dimensional turntable 106 to rotate. After the rotation is completed, the state machine jumps from the descent state to the idle state, indicating that the tracking and aiming is over.

[0104] In this embodiment, by designing a unique state machine for the turntable control unit 1044, different pulse drive signals can be generated according to the rotation step number of the two-dimensional turntable 106, which can improve the rotation stability of the motor.

[0105] Furthermore, the state machine includes a first state machine and a second state machine, used to control the operation of the first and second turntables respectively. The configuration information in the registers of the turntable control unit 1044 includes the maximum number of pulses in the rising and falling states corresponding to the first turntable, as well as the maximum number of pulses in the rising and falling states corresponding to the second turntable. The first state machine compares the rotation step number of the first turntable with the maximum number of pulses in the rising state corresponding to the first turntable, and the sum of the maximum number of pulses in the rising and falling states corresponding to the first turntable, to generate a pulse drive signal for the first turntable, denoted as pul_x. The second state machine compares the rotation step number of the second turntable with the maximum number of pulses in the rising state corresponding to the second turntable, and the sum of the maximum number of pulses in the rising and falling states corresponding to the second turntable, to generate a pulse drive signal for the second turntable, denoted as pul_y. The control methods of the first and second state machines for the corresponding turntables are the same.

[0106] For example, the first state machine can be as follows: Figure 2As shown, step_num_x represents the rotation step number of the first turntable. cfg_up_x and cfg_dn_x represent the maximum number of pulses in the rising state and the maximum number of pulses in the falling state of the first turntable, respectively. cnt_x represents the cumulative rotation step number during this rotation. cnt_x is incremented by 1 for each pulse generated and is cleared to 0 when returning to the idle state.

[0107] The first state machine is used to transition from the idle state to the rising state when step_num_x > 0. When step_num_x > cfg_up_x + cfg_dn_x, the first state machine needs to sequentially pass through the rising state, the stationary state, and the falling state. The number of pulses generated by the first state machine in the rising state is cfg_up_x, and when the rising state ends, cnt_x = cfg_up_x. The number of pulses generated by the first state machine in the stationary state is step_num_x - (cfg_up_x + cfg_dn_x), and when the stationary state ends, cnt_x = step_num_x - cfg_dn_x. The number of pulses generated by the first state machine in the falling state is cfg_dn_x, and when the falling state ends, cnt_x = step_num_x. The pulse drive signal pul_x for the first turntable is generated based on the number of pulses generated by the first state machine in the rising state, the number of pulses generated by the first state machine in the steady state, and the number of pulses generated by the first state machine in the falling state. This signal is sent to the first turntable as a rotation angle control signal to control the first turntable to rotate. After the rotation is completed, the first state machine jumps from the falling state to the idle state, indicating that the current tracking and aiming is over.

[0108] When step_num_x ≤ cfg_up_x, the first state machine only needs to go through the rising state. The number of pulses generated by the first state machine in the rising state is step_num_x, and cnt_x = step_num_x when the rising state ends. Based on the number of pulses generated by the first state machine in the rising state, a pulse drive signal pul_x for the first turntable is generated and sent to the first turntable as a rotation angle control signal to control the first turntable to rotate. After the rotation is completed, the first state machine jumps from the rising state to the idle state, indicating that the tracking and aiming is over.

[0109] When step_num_x > cfg_up_x and step_num_x ≤ cfg_up_x + cfg_dn_x, the first state machine needs to go through the rising and falling states sequentially. The number of pulses generated by the first state machine in the rising state is cfg_up_x, and when the rising state ends, cnt_x = cfg_up_x. Figure 2(Not shown in the image). The number of pulses in the first state machine during the descent state is step_num_x - cfg_up_x, and cnt_x = step_num_x when the descent state ends. Based on the number of pulses generated by the first state machine during the ascending state and the number of pulses generated during the descent state, a pulse drive signal pul_x for the first turntable is generated and sent to the first turntable as a rotation angle control signal to control the first turntable to rotate. After the rotation is completed, the first state machine jumps from the descent state to the idle state, indicating that the current tracking and aiming operation has ended.

[0110] After generating the rotation control signal for the two-dimensional turntable 106, the wireless optical communication tracking system can further amplify the rotation control signal. In an exemplary embodiment, the system also includes:

[0111] The two-dimensional turntable drive device includes a signal amplification circuit and a motor drive circuit. The signal amplification circuit is used to amplify the rotation control signal and input the amplified rotation control signal to the motor drive circuit. The motor drive circuit is used to generate a motor drive signal based on the amplified rotation control signal and send the motor drive signal to the two-dimensional turntable 106.

[0112] The two-dimensional turntable 106 is also used to rotate according to the motor drive signal in order to achieve tracking and aiming at the second end.

[0113] Optionally, the rotation control signals include the rotation direction control signal dir_x for the X-axis, the rotation direction control signal dir_y for the Y-axis, the rotation angle control signal pul_x for the X-axis, and the rotation angle control signal pul_y for the Y-axis of the two-dimensional turntable 106. A signal amplification circuit amplifies the dir_x, dir_y, pul_x, and pul_y signals output from the programmable logic component 104 and inputs them to the motor drive circuit. The motor drive circuit generates two-phase four-wire motor drive signals A+, A-, B+, and B- for the first and second turntables.

[0114] In one embodiment, the signal amplification circuit includes four amplification links, each used to amplify a control signal. Each link includes an input terminal, transistors T1 and T2, resistors R1 and R2, a diode D1, a power supply connection terminal, and an output terminal. The input terminal is connected to the output terminal of the turntable control unit 1044, and is connected to the base of transistor T1. The collector of transistor T1 is connected to the collector of transistor T2 and to the output terminal. The emitter of transistor T1 is connected to the base of transistor T2. The collector of transistor T2 is connected to the anode of diode D1. The emitter of transistor T2 is grounded. The base of transistor T1 is connected to the emitter of transistor T1 through resistor R1, and the base of transistor T2 is connected to the emitter of transistor T2 through resistor R2. Resistors R1 and R2 are connected. The cathode of diode D1 is connected to the power supply connection terminal. The output terminal is connected to the input terminal of the motor drive circuit.

[0115] The signal amplification circuit includes four identical amplification links, each used to amplify a control signal. Each amplification link is as follows: Figure 3 As shown, the circuit includes an input terminal IN, transistors T1 and T2, resistors R1 and R2, diode D1, a power supply terminal VCC, and an output terminal OUT. The input terminal IN is connected to the output terminal of the turntable control unit 1044. Transistors T1 and T2 are connected in series to form a Darlington transistor. The amplification factor of the Darlington transistor is the product of the amplification factors of transistors T1 and T2, effectively improving signal amplification. A diode D1 is connected in reverse to the Darlington transistor to prevent negative voltage breakdown, protecting diodes T1 and T2. The output terminal OUT is connected to the cathode of the motor drive circuit. The power supply terminal VCC is connected to the power supply, and can share the same power supply as the motor drive circuit. The base of transistor T1 is connected to its emitter through resistor R1, and the base of transistor T2 is connected to its emitter through resistor R2. Resistors R1 and R2 are connected together. Resistors R1 and R2 provide turn-off and discharge paths for transistors T1 and T2, respectively, improving the overall turn-off speed, preventing mis-conduction when the base is floating, and enhancing the stability of the signal amplification circuit. When the input IN is 1, transistors T1 and T2 are turned on, and the output OUT is 0; when the input IN is 0, transistors T1 and T2 are not turned on, and the output OUT outputs VCC. When transistors T1 and T2 are turned on, they amplify the uA-level current output from the turntable control unit 1044 to approximately 500mA through a two-stage amplification. The motor drive circuit works in conjunction with the signal amplification circuit to drive the stepper motor.

[0116] In this embodiment, by setting a two-dimensional turntable drive device including a signal amplification circuit and a motor drive circuit, the current at the output terminal of the programmable logic component 104 can be amplified, thereby expanding the input and output terminals of the programmable logic component 104. Combined with the motor drive circuit, the function of expanding the input and output terminals of the programmable logic component 104 to control the stepper motor can be realized.

[0117] In an exemplary embodiment, the programmable logic component 104 can also be used to modulate and demodulate the data to be transmitted in the wireless optical communication system. Specifically, the first end of the wireless optical communication system sends the data to be transmitted to the programmable logic component 104 at the first end. The data to be transmitted can be video, images, voice, text, etc. The programmable logic component 104 at the first end modulates the data to be transmitted onto a laser signal, and transmits the data to the second end by carrying the data through the laser signal. After receiving the laser data, the second end sends the laser data to the programmable logic component 104 at the second end. The programmable logic component 104 at the second end demodulates the data to be transmitted from the laser data. In this embodiment, the wireless optical communication tracking system and the wireless optical communication system share the programmable logic component 104, which is beneficial for reducing the overall system size and lowering the system cost.

[0118] In one exemplary embodiment, such as Figure 4 As shown, another wireless optical communication tracking system is provided, which includes: an image acquisition device 102, a programmable logic component 104, a two-dimensional turntable drive device 108, a two-dimensional turntable 106, and a configuration port 110. The programmable logic component 104 integrates a target preset position recognition unit 1042, a turntable control unit 1044, and an industrial camera communication interface 1046. The two-dimensional turntable drive device 108 includes a signal amplification circuit 1082 and a motor drive circuit 1084. The two-dimensional turntable 106 includes a first turntable 1062 and a second turntable 1064, wherein:

[0119] Image acquisition device 102 is used to acquire the current frame target image of the second end.

[0120] The target preset position recognition unit 1042 is used to cross-correlate the current frame target image with the template target image to obtain the cross-correlation result; when it is determined from the cross-correlation result that the current frame target image contains the target pattern in the template target image, the coordinates of the preset position of the target pattern in the current frame target image are identified, and the coordinates of the preset position of the target pattern in the current frame target image are input to the turntable control unit 1044.

[0121] The turntable control unit 1044 is used to compare the coordinates of the preset position of the target pattern in the current frame target image with the coordinates of the preset position of the target pattern in the previous frame target image to determine the rotation attitude of the two-dimensional turntable 106, which includes the rotation direction and rotation angle; generate a rotation direction control signal for the two-dimensional turntable 106 according to the rotation direction of the two-dimensional turntable 106; and determine the number of rotation steps of the two-dimensional turntable 106 according to the rotation angle and the motor step angle of the two-dimensional turntable 106.

[0122] Configuration port 110 is used to configure the values ​​of the registers in the turntable control unit 1044 to obtain the register configuration information. The turntable control unit 1044 also includes a state machine, the registers are used to control the state machine, and the state machine is used to control the operation of the two-dimensional turntable 106. The turntable control unit 1044 is also used to compare the rotation step number of the two-dimensional turntable 106 with the configuration information of the register, determine the number of pulses generated by the state machine in different states based on the comparison result, generate pulse drive signals for the two-dimensional turntable 106 based on the number of pulses generated by the state machine in different states, and use the pulse drive signals as rotation angle control signals.

[0123] The signal amplification circuit 1082 is used to amplify the rotation direction control signal and the rotation angle control signal, and input the amplified rotation control signal to the motor drive circuit 1084.

[0124] The motor drive circuit 1084 is used to generate a motor drive signal based on the amplified rotation control signal and send the motor drive signal to the two-dimensional turntable 106.

[0125] The two-dimensional turntable 106 is used to rotate according to the motor drive signal to point to the preset position of the target pattern in the target image of the current frame, so as to realize the tracking aiming of the second end.

[0126] In this embodiment, the target preset position recognition unit 1042 and the turntable control unit 1044 are both integrated onto the programmable logic component 104, eliminating the need for a separate turntable controller and a host computer, thus significantly reducing the size and cost of the tracking and aiming system. Integrating the image processing function of the target preset position recognition unit 1042 and the turntable control function of the turntable control unit 1044 onto the programmable logic component 104 allows the processing delay for each frame of image to be controlled within 20ms, meaning that one tracking and aiming operation can be completed in 20ms, which is faster and has less delay compared to implementation on a host computer. By designing a unique state machine for the turntable control unit 1044, different pulse drive signals can be generated based on the rotation step number of the two-dimensional turntable 106, improving the stability of motor rotation. By setting up a two-dimensional turntable drive device including a signal amplification circuit 1082 and a motor drive circuit 1084, the current at the output terminal of the programmable logic component 104 can be amplified, thereby expanding the input and output terminals of the programmable logic component 104. Combined with the motor drive circuit 1084, the expanded input and output terminals of the programmable logic component 104 can control the stepper motor.

[0127] In one exemplary embodiment, such as Figure 5 As shown, a wireless optical communication tracking method is provided, applied to the wireless optical communication tracking system in any of the above embodiments. The method includes the following steps:

[0128] Step 502: Obtain the target image of the current frame from the second end.

[0129] Step 504: Identify the coordinates of the preset position of the target pattern in the target image of the current frame.

[0130] Step 506: Compare the coordinates of the preset position of the target pattern in the current frame target image with the coordinates of the preset position of the target pattern in the previous frame target image to generate a rotation control signal for the two-dimensional turntable 106.

[0131] Step 508: Control the two-dimensional turntable 106 to rotate according to the rotation control signal so as to point to the preset position of the target pattern in the target image of the current frame, so as to realize the tracking aiming of the second end.

[0132] In an exemplary embodiment, step 504, identifying the coordinates of a preset position of a target pattern in the current frame target image, includes: performing cross-correlation between the current frame target image and the template target image to obtain a cross-correlation result; when it is determined from the cross-correlation result that the current frame target image contains a target pattern from the template target image, identifying the coordinates of a preset position of the target pattern in the current frame target image.

[0133] In an exemplary embodiment, step 506, comparing the coordinates of the preset position of the target pattern in the current frame target image with the coordinates of the preset position of the target pattern in the previous frame target image to generate a rotation control signal for the two-dimensional turntable 106, includes: comparing the coordinates of the preset position of the target pattern in the current frame target image with the coordinates of the preset position of the target pattern in the previous frame target image to determine the rotation attitude of the two-dimensional turntable 106, the rotation attitude including the rotation direction and the rotation angle; generating a rotation direction control signal for the two-dimensional turntable 106 based on the rotation direction of the two-dimensional turntable 106, and generating a rotation angle control signal for the two-dimensional turntable 106 based on the rotation angle of the two-dimensional turntable 106.

[0134] In an exemplary embodiment, generating a rotation angle control signal for the two-dimensional turntable 106 based on its rotation angle includes: determining the number of rotation steps for the two-dimensional turntable 106 based on its rotation angle and the motor step angle of the two-dimensional turntable 106; generating a pulse drive signal for the two-dimensional turntable 106 based on the number of rotation steps for the two-dimensional turntable 106 and the configuration information of the registers in the turntable control unit 1044; and using the pulse drive signal as the rotation angle control signal.

[0135] In an exemplary embodiment, the configuration information of the registers in the turntable control unit 1044 includes the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, with each pulse corresponding to a rotation step. Generating the pulse drive signal for the two-dimensional turntable 106 based on the rotation step count of the two-dimensional turntable 106 and the configuration information of the registers in the turntable control unit 1044 includes: when the rotation step count of the two-dimensional turntable 106 is greater than the sum of the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, determining the maximum number of pulses in the rising state as the number of pulses generated by the state machine in the rising state; determining the difference between the rotation step count of the two-dimensional turntable 106 and the sum of the maximum number of pulses in the rising state and the maximum number of pulses in the falling state as the number of pulses generated by the state machine in the stable state; and determining the maximum number of pulses in the falling state as the number of pulses generated by the state machine in the falling state. The pulse drive signal for the two-dimensional turntable 106 is generated based on the number of pulses generated by the state machine in the rising state, the number of pulses generated by the state machine in the stable state, and the number of pulses generated by the state machine in the falling state.

[0136] In an exemplary embodiment, the configuration information of the registers in the turntable control unit 1044 includes the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, with each pulse corresponding to a rotation step. Generating the pulse drive signal for the two-dimensional turntable 106 based on the rotation step count of the two-dimensional turntable 106 and the configuration information of the registers in the turntable control unit 1044 includes: when the rotation step count of the two-dimensional turntable 106 is less than or equal to the maximum number of pulses in the rising state, determining the rotation step count of the two-dimensional turntable 106 as the number of pulses generated by the state machine in the rising state, and generating the pulse drive signal for the two-dimensional turntable 106 based on the number of pulses generated by the state machine in the rising state.

[0137] In an exemplary embodiment, the configuration information of the registers in the turntable control unit 1044 includes the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, with each pulse corresponding to a rotation step. Generating the pulse drive signal for the two-dimensional turntable 106 based on the rotation step count of the two-dimensional turntable 106 and the configuration information of the registers in the turntable control unit 1044 includes: when the rotation step count of the two-dimensional turntable 106 is greater than the maximum number of pulses in the rising state, and less than or equal to the sum of the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, determining the maximum number of pulses in the rising state as the number of pulses generated by the state machine in the rising state, and determining the difference between the rotation step count of the two-dimensional turntable 106 and the maximum number of pulses in the rising state as the number of pulses generated by the state machine in the falling state; generating the pulse drive signal for the two-dimensional turntable 106 based on the number of pulses generated by the state machine in the rising state and the number of pulses generated by the state machine in the falling state.

[0138] In one exemplary embodiment, the rotation control signal is amplified, a motor drive signal is generated based on the amplified rotation control signal, and the two-dimensional turntable 106 is controlled to rotate according to the motor drive signal to achieve tracking and aiming at the second end.

[0139] In an exemplary embodiment, the rotation control signal includes a rotation direction control signal and a rotation angle control signal for the two-dimensional turntable 106. The rotation direction control signal for the two-dimensional turntable 106 includes a rotation direction control signal for the X-axis and a rotation direction control signal for the Y-axis. The rotation angle control signal for the two-dimensional turntable 106 includes a rotation angle control signal for the X-axis and a rotation angle control signal for the Y-axis.

[0140] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0141] In one exemplary embodiment, a computer device is provided, which may be a communication device, and its internal structure diagram may be as follows. Figure 6 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data such as the coordinates of the preset position of the target pattern in the current frame target image and the rotation control signals of the two-dimensional turntable 106. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a wireless optical communication tracking method.

[0142] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0143] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0144] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0145] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0146] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, pattern processors, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0147] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0148] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A wireless optical communication tracking system, characterized in that, The system is located at a first end of a wireless optical communication system, which also includes a second end. The first end and the second end communicate wirelessly. The system includes: An image acquisition device is used to acquire the current frame target image of the second end; The programmable logic component integrates a target preset position recognition unit and a turntable control unit. The target preset position recognition unit is used to identify the coordinates of the preset position of the target pattern in the current frame target image. The turntable control unit is used to compare the coordinates of the preset position of the target pattern in the current frame target image with the coordinates of the preset position of the target pattern in the previous frame target image to generate a rotation control signal for the two-dimensional turntable. A two-dimensional turntable is used to rotate according to the rotation control signal to point to a preset position of the target pattern in the current frame target image, so as to achieve tracking and aiming at the second end.

2. The system according to claim 1, characterized in that, The target preset position recognition unit is further configured to cross-correlate the current frame target image with the template target image to obtain a cross-correlation result; when it is determined from the cross-correlation result that the current frame target image contains a target pattern from the template target image, the unit identifies the coordinates of the preset position of the target pattern in the current frame target image and inputs the coordinates of the preset position of the target pattern in the current frame target image to the turntable control unit.

3. The system according to claim 1, characterized in that, The turntable control unit is further configured to compare the coordinates of the preset position of the target pattern in the current frame target image with the coordinates of the preset position of the target pattern in the previous frame target image to determine the rotation attitude of the two-dimensional turntable, the rotation attitude including the rotation direction and the rotation angle; generate a rotation direction control signal of the two-dimensional turntable according to the rotation direction of the two-dimensional turntable, and generate a rotation angle control signal of the two-dimensional turntable according to the rotation angle of the two-dimensional turntable.

4. The system according to claim 3, characterized in that, The turntable control unit is further configured to determine the number of rotation steps of the two-dimensional turntable based on the rotation angle of the two-dimensional turntable and the motor step angle of the two-dimensional turntable; generate a pulse drive signal for the two-dimensional turntable based on the number of rotation steps of the two-dimensional turntable and the configuration information of the register in the turntable control unit, and use the pulse drive signal as a rotation angle control signal.

5. The system according to claim 4, characterized in that, The configuration information of the registers in the turntable control unit includes the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, with each pulse corresponding to one rotation step; The turntable control unit includes: A state machine is used to determine the maximum number of pulses in the rising state as the number of pulses generated by the state machine in the rising state, the difference between the number of rotation steps of the two-dimensional turntable and the sum of the maximum number of pulses in the rising state and the maximum number of pulses in the falling state as the number of pulses generated by the state machine in the steady state, and the maximum number of pulses in the falling state as the number of pulses generated by the state machine in the falling state; and to generate pulse drive signals for the two-dimensional turntable based on the number of pulses generated by the state machine in the rising state, the steady state, and the falling state.

6. The system according to claim 4, characterized in that, The configuration information of the registers in the turntable control unit includes the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, with each pulse corresponding to one rotation step; The turntable control unit includes: A state machine is used to determine the number of rotation steps of the two-dimensional turntable as the number of pulses generated by the state machine in the rising state when the number of rotation steps of the two-dimensional turntable is less than or equal to the maximum number of pulses in the rising state, and to generate a pulse drive signal for the two-dimensional turntable based on the number of pulses generated by the state machine in the rising state.

7. The system according to claim 4, characterized in that, The configuration information of the registers in the turntable control unit includes the maximum number of pulses in the rising state and the maximum number of pulses in the falling state, with each pulse corresponding to one rotation step; The turntable control unit includes: A state machine is used to determine the maximum number of pulses in the rising state as the number of pulses generated by the state machine in the rising state, and to determine the difference between the number of rotation steps of the two-dimensional turntable and the maximum number of pulses in the rising state as the number of pulses generated by the state machine in the falling state, when the number of rotation steps of the two-dimensional turntable is greater than the maximum number of pulses in the rising state and less than or equal to the sum of the maximum number of pulses in the rising state and the maximum number of pulses in the falling state; and to generate pulse drive signals for the two-dimensional turntable based on the number of pulses generated by the state machine in the rising state and the number of pulses generated by the state machine in the falling state.

8. The system according to claim 1, characterized in that, The system also includes: A two-dimensional turntable driving device includes a signal amplification circuit and a motor driving circuit. The signal amplification circuit amplifies the rotation control signal and inputs the amplified rotation control signal to the motor driving circuit. The motor driving circuit generates a motor driving signal based on the amplified rotation control signal and sends the motor driving signal to the two-dimensional turntable. The two-dimensional turntable is also used to rotate according to the motor drive signal in order to achieve tracking and aiming at the second end.

9. The system according to claim 8, characterized in that, The rotation control signal includes a rotation direction control signal and a rotation angle control signal for the two-dimensional turntable. The rotation direction control signal includes a rotation direction control signal for the X-axis and a rotation direction control signal for the Y-axis of the two-dimensional turntable. The rotation angle control signal includes a rotation angle control signal for the X-axis and a rotation angle control signal for the Y-axis of the two-dimensional turntable. The signal amplification circuit includes four amplification links, each used to amplify a control signal. Each link includes an input terminal, transistors T1 and T2, resistors R1 and R2, a diode D1, a power supply connection terminal, and an output terminal. The input terminal is connected to the output terminal of the turntable control unit, and is also connected to the base of transistor T1. The collector of transistor T1 is connected to the collector of transistor T2 and to the output terminal. The emitter of transistor T1 is connected to the... The base of transistor T2 is connected, the collector of transistor T2 is connected to the anode of diode D1, the emitter of transistor T2 is grounded, the base of transistor T1 is connected to the emitter of transistor T1 through resistor R1, the base of transistor T2 is connected to the emitter of transistor T2 through resistor R2, resistor R1 is connected to resistor R2, the cathode of diode D1 is connected to the power supply terminal, and the output terminal is connected to the input terminal of the motor drive circuit.

10. A wireless optical communication tracking method, characterized in that, The method, applied to the wireless optical communication tracking system according to any one of claims 1 to 9, comprises: Obtain the target image of the current frame from the second end; Identify the coordinates of a preset position of the target pattern in the current frame target image; The coordinates of the preset position of the target pattern in the current frame target image are compared with the coordinates of the preset position of the target pattern in the previous frame target image to generate a rotation control signal for the two-dimensional turntable. The rotation control signal controls the two-dimensional turntable to rotate, pointing to a preset position of the target pattern in the current frame target image, thereby achieving tracking and aiming at the second end.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in claim 10.