Fine tracking control method, system and equipment based on FPGA (Field Programmable Gate Array) and medium
By initializing and classifying image pixel data on an FPGA, and optimizing PID control using a differential evolution algorithm, the problems of slow extraction speed of the light spot centroid and serial port transmission delay in quantum communication were solved. This enabled rapid extraction and stable tracking of the light spot centroid, improving the control accuracy and system performance of quantum communication.
Patent Information
- Application Number
- CN202511992017.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-02-27
AI Technical Summary
In a quantum communication precision tracking closed-loop control system, the slow extraction speed of the light spot centroid and the serial port transmission delay lead to a reduction in control bandwidth, which affects system performance.
An FPGA-based approach is adopted, which initializes the image pixel dataset, classifies and extracts parameters using grayscale thresholds and neighboring pixel relationships, optimizes the PID control model using differential evolution algorithm, quickly calculates the centroid coordinates of the light spot and generates mirror control commands, and achieves stable tracking of the light spot at the center of the field of view.
It improves the extraction speed of the spot centroid off-target amount, reduces transmission delay, enhances the tracking accuracy and system stability of quantum communication, and reduces the line-of-sight deviation at both ends of the communication.
Smart Images

Figure CN121585274A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of quantum communication, in particular to a fine tracking control method and system based on FPGA, a device and a medium. BACKGROUND
[0002] In the operation process of the quantum communication fine tracking closed-loop control system, the light spot centroid off-target quantity extraction and the fine tracking closed-loop control are usually two different modules, which are independently operated, and data is transmitted through a serial port. The light spot centroid extraction algorithm and the fine tracking control algorithm, and the transmission delay of the light spot centroid position off-target quantity to the fine tracking controller have the greatest impact on the closed-loop control performance. In the prior art, the light spot centroid position required by the fine tracking subsystem for closed-loop control is generated by the fine tracking camera extraction. The speed of extracting the off-target quantity will affect the off-target quantity frame frequency output by the camera. The extracted off-target quantity is transmitted to the fine tracking controller through the serial port, and the serial communication process will generate additional time overhead. If the serial port baud rate is low, a large pure lag element will be introduced, which will bring difficulties to the closed-loop control, and to some extent, reduce the system control bandwidth. SUMMARY
[0003] The present application aims to improve at least one technical problem in the background art.
[0004] The present application provides a fine tracking control method based on FPGA, applied to FPGA, comprising: obtaining an image pixel data set and initializing the image pixel data set; synchronously performing classification marking and parameter extraction on the initialized image pixel data set based on a preset gray threshold and a neighborhood pixel relationship, to obtain respective centroid parameter values corresponding to the image pixel data, and generating a centroid parameter value group according to all the centroid parameter values; calculating the centroid parameter value group according to a preset centroid formula, to obtain a light spot centroid coordinate; obtaining a fine tracking field center coordinate and performing deviation calculation on the light spot centroid coordinate, to obtain a real-time off-target quantity; performing parameter optimization on a preset control model based on a differential evolution algorithm, to obtain an optimized parameter; generating a mirror voltage control quantity based on the optimized parameter and the real-time off-target quantity; generating a mirror control instruction based on the mirror voltage control quantity.
[0005] According to some technical solutions of the present application, the neighborhood pixel relationship includes the left pixel and the upper pixel of the current pixel; and the synchronous classification marking and parameter extraction on the initialized image pixel data based on the preset gray threshold and the neighborhood pixel relationship, to obtain respective centroid parameter values corresponding to the image pixel data, specifically comprises: read each pixel in the initialized image pixel data set in a preset order and sequentially obtain a gray value of the current pixel; For each current pixel, compare the gray value of the current pixel with a preset gray threshold, and determine the classification label of the current pixel according to the comparison result and the label state of the left pixel and the upper pixel of the current pixel. If the classification label of the current pixel is a light spot pixel, the parameter information of the current pixel is obtained and accumulated in a set of preset centroid accumulators to obtain the centroid parameter value corresponding to the current pixel.
[0006] According to some technical solutions of the present application, the comparison of the gray value of the current pixel with the preset gray threshold and the determination of the classification label of the current pixel according to the comparison result and the label state of the left pixel and the upper pixel of the current pixel specifically include: Compare the gray value of the current pixel with the gray threshold based on the preset gray threshold; If the gray value of the current pixel is less than or equal to the gray threshold, the current pixel is labeled as a background pixel; If the gray value of the current pixel is greater than the gray threshold, the label information of the left pixel and the upper pixel of the current pixel is obtained and a label judgment is made; If the left pixel and the upper pixel of the current pixel are both background pixel labels, the current pixel is labeled as a noise pixel; If the left pixel and the upper pixel of the current pixel are both noise pixel labels or light spot pixel labels, the current pixel is labeled as a light spot pixel.
[0007] According to some technical solutions of the present application, if the classification label of the current pixel is a light spot pixel, the parameter information of the current pixel is obtained and accumulated in a set of preset centroid accumulators, specifically including: If the classification label of the current pixel is a light spot pixel, the gray value, row coordinate and column coordinate of the current pixel are obtained; The gray value, row coordinate and column coordinate of the current pixel are accumulated in a set of preset centroid accumulators.
[0008] According to some technical solutions of the present application, the set of centroid parameter values is calculated according to a preset centroid formula to obtain the light spot centroid coordinates, specifically including: The set of centroid parameter values is extracted to obtain centroid parameter data; The centroid parameter data and the preset centroid formula are calculated to obtain the row coordinate and column coordinate of the light spot centroid; The row coordinate and column coordinate are integrated to obtain the light spot centroid coordinates.
[0009] According to some technical solutions of this application, the preset control model is a PID control model; the optimization of the preset control model based on the differential evolution algorithm to obtain optimized parameters specifically includes: In the PID control model, a population containing multiple individuals is randomly initialized. The population is iteratively optimized using the differential evolution algorithm to obtain optimal parameters.
[0010] According to some technical solutions of this application, the iterative optimization of the population based on the differential evolution algorithm to obtain optimization parameters specifically includes: In each iteration, one individual is selected from the current population as the target individual, and three distinct individuals are randomly selected. Based on the parameter difference between two randomly selected individuals and a preset scaling factor, the parameters of the remaining individuals are perturbed to generate mutated individuals; The mutant individuals and the target individuals are mixed with parameters according to a preset crossover probability to generate experimental individuals; The control performance index values for the experimental individuals and the target individuals were calculated and compared to identify the individuals with better performance. Individuals with better performance will be retained and carried over to the next generation of the population for further iteration. When the iteration reaches the preset termination condition, the best performing individual in the population across all generations is obtained. The parameters of the best-performing individual are obtained based on the best-performing individual and used as optimization parameters.
[0011] This application also provides an FPGA-based precision tracking control system, which includes: The initialization module is used to acquire the image pixel dataset and initialize the image pixel dataset; The extraction module is used to classify, label, and extract parameters from image pixel data synchronously after initialization, based on a preset grayscale threshold and the relationship between neighboring pixels, in order to obtain a centroid parameter value set. The centroid calculation module is used to calculate the centroid parameter value set according to the preset centroid formula to obtain the centroid coordinates of the light spot; The deviation calculation module is used to obtain the coordinates of the center of the fine tracking field of view and calculate the deviation with the coordinates of the centroid of the spot to obtain the real-time miss distance; The optimization module is used to optimize the parameters of a preset control model based on the differential evolution algorithm to obtain optimized parameters. The control quantity generation module is used to generate the mirror voltage control quantity based on the optimized parameters and the real-time target miss distance; The instruction generation module is used to generate mirror control instructions based on the mirror voltage control quantity.
[0012] This application also provides an FPGA-based fine tracking control method, wherein the processor executes the computer program to implement the steps of the FPGA-based fine tracking control method described above.
[0013] This application provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the various steps of the FPGA-based fine tracking control method described above.
[0014] This application provides an FPGA-based fine tracking control method, which has at least the following advantages: Through rapid spot centroid extraction and differential evolution-based fine tracking control, it can improve the extraction speed of spot centroid miss distance, reduce the transmission delay of fine tracking miss distance, and improve the tracking accuracy of quantum communication. Simultaneously, based on the generated voltage control command, the deflection angle of the reflector is adjusted to keep the spot at the center of the fine tracking field of view, further reducing the deviation of the line of sight at both ends of the communication, thereby maintaining the stability of the satellite-to-ground quantum communication link. Attached Figure Description
[0015] Figure 1 A first flowchart of an FPGA-based fine tracking control method provided in an embodiment of this application; Figure 2 A second flowchart of the FPGA-based fine tracking control method provided in the embodiments of this application; Figure 3 A third flowchart of the FPGA-based fine tracking control method provided in the embodiments of this application; Figure 4 A fourth flowchart of the FPGA-based fine tracking control method provided in the embodiments of this application; Figure 5 A fifth flowchart of the FPGA-based fine tracking control method provided in the embodiments of this application; Figure 6 A sixth flowchart of the FPGA-based fine tracking control method provided in the embodiments of this application; Figure 7 A seventh flowchart of the FPGA-based fine tracking control method provided in the embodiments of this application; Figure 8 A structural diagram of an FPGA-based precision tracking control system provided in an embodiment of this application; Figure 9 This is a structural diagram of an FPGA-based precision tracking control device provided in an embodiment of this application. Detailed Implementation
[0016] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0017] In the description of this application, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation or be constructed or operated in a specific orientation. Therefore, they should not be construed as limiting the present invention.
[0018] In the description of this application, unless otherwise expressly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.
[0019] The following is combined with Figures 1 to 9 Embodiments of the present invention will be described.
[0020] Quantum communication is optical communication that uses the polarization state of photons as the information carrier. The transmitter emits encoded single photons, and the receiver extracts the communication information from the polarization state of the received single photons. In principle, it is currently the most ideal method of secure communication. To maintain a stable communication link, a stable acquisition, tracking, and pointing (ATP) system must be established. A quantum communication tracker is a ground-based system used to establish and maintain a satellite-to-ground communication link. It typically employs coarse-fine composite axis control, comprising both a coarse tracking system and a fine tracking system.
[0021] The coarse tracking system has a low bandwidth but a large dynamic range, enabling a wide range of rotation along the azimuth and pitch axes to perform scanning, tracking, and large-field-of-view tracking. The fine tracking system, on the other hand, has a high bandwidth but a small field of view, effectively compensating for the residual errors of coarse tracking. Furthermore, the fine tracking system has a strong ability to suppress high-frequency disturbances. The overall accuracy of the ATP system depends on the control accuracy of the fine tracking system. The fine tracking system is the most critical component of the entire tracking and aiming system, determining the overall tracking accuracy of the tracker.
[0022] The actuator of the precision tracking system is a fast steering mirror (FSM). Currently, there are two main driving methods for fast steering mirrors: the driving method based on voice coil motors and the driving method based on piezoelectric ceramics.
[0023] Voice coil motors (FSMs) have a large stroke and require a relatively small driving voltage. Their driving principle is based on Ampere's law, where the magnetic force generated by a current-carrying conductor in a magnetic field acts on the FSM. However, due to structural limitations, the mechanical resonant frequency of the voice coil motor's driving method is relatively low, making it difficult to meet the high closed-loop control bandwidth requirements of precision tracking systems. Piezoelectric ceramic FSMs have a small stroke and require a large driving voltage, typically several hundred volts, but their resolution is far superior to that of voice coil motors, and their resonant frequency is very high, typically in the thousands of hertz. Piezoelectric ceramic fast reflectors (FSMs) are widely used in micro- and nano-positioning systems due to their advantages such as small size, light weight, low power consumption, low heat dissipation, low electromagnetic noise, high accuracy, fast response, and ease of control. However, because the deformation of piezoelectric ceramics is linearly related to their charge, they exhibit significant creep and hysteresis nonlinear characteristics, which pose challenges to control. These characteristics limit the control accuracy of precision tracking systems, thus reducing the efficiency of quantum communication.
[0024] Based on this, this application provides a fine tracking control method based on FPGA, the control method comprising: S100: Obtain the image pixel dataset and initialize the image pixel dataset; For example, real-time image data streams are acquired from an optical camera or image sensor, stored in the FPGA's internal or external memory, and initialization settings such as clearing the accumulator and setting the initial threshold are performed.
[0025] S200, based on a preset grayscale threshold and neighboring pixel relationships, synchronously performs classification labeling and parameter extraction on the initialized image pixel dataset to obtain the centroid parameter values corresponding to each image pixel data. A centroid parameter value group is generated based on all centroid parameter values. The grayscale value of each pixel is read sequentially in row scanning order. Combining the preset grayscale threshold and the labeling status of the left and top neighboring pixels, the current pixel is classified as background, noise, or a glare. If it is determined to be a glare pixel, its grayscale value and row / column coordinates are accumulated in real time to the centroid accumulator until all pixels are processed, forming a centroid parameter value group. Specifically, while pixel data is input, it continuously checks whether the grayscale value of each pixel is greater than the threshold and, combined with the labeling status of its left and top neighboring pixels, classifies it as background, noise, or a glare pixel. The grayscale value and coordinates of the glare pixel are accumulated synchronously, thus achieving pixel-level parallel processing. Centroid extraction can begin without waiting for the entire image to be output, significantly improving centroid extraction speed and reducing system latency.
[0026] S300 calculates the centroid parameter value set according to the preset centroid formula to obtain the centroid coordinates of the spot. It extracts the sum of gray values, the sum of gray value row coordinates, and the sum of gray value column coordinates from the centroid parameter value set, substitutes them into the preset centroid formula, and performs the calculation through the FPGA hardware multiplier and divider during actual operation. Finally, it outputs the row and column coordinates of the spot centroid. After the entire image is processed, the centroid coordinates are calculated according to the gray centroid formula using the accumulated total gray value, total row coordinates, and total column coordinates of the spot, thereby obtaining the high-precision spot centroid position and providing accurate input for subsequent tracking control.
[0027] S400: Obtain the coordinates of the center of the fine-tracking field of view and calculate the deviation between them and the coordinates of the spot centroid to obtain the real-time miss distance. Compare the calculated spot centroid coordinates with the coordinates of the center of the fine-tracking field of view to obtain the real-time miss distance. For example, the standard coordinates (X0, Y0) of the center of the fine-tracking field of view are stored in the FPGA in advance. The difference between the calculated spot centroid coordinates (Xc, Yc) and the standard coordinates is calculated to obtain the real-time miss distance (ΔX, ΔY), that is, the two deviation values ΔX = Xc - X0 and ΔY = Yc - Y0. This miss distance directly reflects the degree of deviation between the current position of the spot and the center of the field of view.
[0028] The S500 optimizes the parameters of a preset control model using a differential evolution algorithm to obtain optimal parameters. For example, based on a PID control model, the differential evolution algorithm optimizes the proportional, integral, and derivative coefficients of the PID controller. First, an initial population containing multiple parameter combinations is generated. Then, through mutation, crossover, and selection operations, iterative optimization is performed to obtain the parameter combination that best achieves the control performance index. This adaptive optimization of control parameters enhances the system's adaptability to the nonlinear characteristics of piezoelectric ceramics and improves tracking accuracy.
[0029] The S600 generates mirror voltage control quantities based on optimized parameters and real-time miss distances. The obtained real-time miss distances (ΔX, ΔY) are input into the optimized PID control model. PID calculations generate basic control quantities, which are then converted into the required driving voltage range for the piezoelectric ceramic fast reflector by the voltage amplification module within the FPGA, resulting in the final mirror voltage control quantity. Thus, by utilizing the optimized parameters and the real-time miss distances, the control voltage output is calculated, enabling precise control of the fast reflector and compensating for beam offset.
[0030] The S700 generates mirror control commands based on the mirror voltage control quantity. The calculated voltage control quantity is converted into a command signal to drive the piezoelectric ceramic FSM, which drives the FSM to respond quickly. The voltage signal corresponding to the control command drives the piezoelectric ceramic to extend or retract, thereby causing the fast reflector to deflect. The fast reflector adjusts its tilt angle, allowing the light spot to return to the center of the field of view, achieving stable tracking of the light spot at the center of the field of view.
[0031] Among them, Field-Programmable Gate Arrays (FPGAs), as a type of semi-custom circuit device in application-specific integrated circuits, are characterized by abundant hardware resources and high flexibility. They are suitable for use as controllers to drive detectors and realize the acquisition, processing, and storage of detector output image data. In quantum communication systems, FPGAs are used as detector controllers to extract the off-target amount of the light spot centroid, and typically, double-rate synchronous dynamic random access memory (DDR) is externally connected to the FPGA for temporary storage of image data during image processing.
[0032] In some embodiments, in step S200, after initialization, image pixel data is synchronously classified, labeled, and parameter extracted based on a preset grayscale threshold and neighboring pixel relationships to obtain a centroid parameter value set, specifically including: S210: Read each pixel in the initialized image pixel dataset in a preset order and obtain the grayscale value of the current pixel in sequence; for example, using a line scanning method, starting from the first pixel in the upper left corner of the image, read the grayscale value of each pixel in sequence, and temporarily store the current pixel information through the pixel cache module of the FPGA.
[0033] S220: For each current pixel, compare its grayscale value with a preset grayscale threshold, and determine the classification label of the current pixel based on the comparison result and the labeling status of the pixels to its left and above. By comparing the grayscale value of the current pixel with the preset threshold and combining the labeling status of the pixels to its left and above, determine whether the current pixel is background, noise or light spot.
[0034] S230, if the current pixel is classified as a spot pixel, the parameter information of the current pixel is obtained and accumulated into a set of preset centroid accumulators to obtain the centroid parameter value corresponding to the current pixel; if the current pixel is a spot marker, its gray value and row and column coordinates are immediately extracted and accumulated into the corresponding centroid accumulator in real time. The accumulation process is executed in parallel with the reading of the next pixel.
[0035] After processing all pixels in the image pixel dataset, a centroid parameter value set is obtained. After all pixels have been processed, the final values of the accumulators are integrated to form the centroid parameter value set, which is then stored in the FPGA's internal register.
[0036] Therefore, reading, judging, marking and accumulating are achieved pixel by pixel, enabling processing while inputting, which significantly reduces the centroid extraction time.
[0037] In some embodiments, in step S220, for each current pixel, its grayscale value is compared with a preset grayscale threshold, and a classification label for the current pixel is determined based on the comparison result and neighboring pixel information, specifically including: S221, Based on a preset grayscale threshold, compare the grayscale value of the current pixel with the grayscale threshold; S222, If the grayscale value of the current pixel is less than or equal to the grayscale threshold, then mark the current pixel as a background pixel; S223, If the gray value of the current pixel is greater than the gray value threshold, then obtain the marking information of the left and top pixels of the current pixel and make a marking judgment. S224, If the pixels to the left and above the current pixel are both marked as background pixels, then mark the current pixel as a noise pixel; S225, if the pixels to the left and above the current pixel are both noise pixel markers or spot pixel markers, then mark the current pixel as a spot pixel.
[0038] Therefore, by determining pixel type based on grayscale threshold and neighborhood marker, spot, background and noise can be distinguished more accurately, improving the noise resistance and accuracy of centroid extraction.
[0039] In some embodiments, in step S230, if the current pixel is classified as a spot pixel, the parameter information of the current pixel is obtained and accumulated into a set of preset centroid accumulators. Specifically, this includes: accurately extracting the gray value, row and column coordinates, and other parameters of the spot pixel, and accumulating them into the corresponding dedicated accumulators to ensure the independence and accuracy of parameter storage.
[0040] S231, If the current pixel is classified as a spot pixel, then obtain the gray value, row coordinates and column coordinates of the current pixel; S232, accumulates the grayscale value, row coordinate, and column coordinate of the current pixel into a set of preset centroid accumulators.
[0041] In some embodiments, step S300 involves calculating the centroid parameter value set according to a preset centroid formula to obtain the centroid coordinates of the light spot, specifically including: S310, Extract the centroid parameter value set to obtain centroid parameter data; S320 calculates the centroid parameter data and the preset centroid formula to obtain the row and column coordinates of the spot centroid; S330 integrates the row and column coordinates to obtain the centroid coordinates of the light spot.
[0042] In one specific embodiment, a fixed grayscale threshold is first set. The grayscale values of existing image pixels are compared with this threshold. Pixels with grayscale values greater than the threshold are marked as noise or flares, while those with grayscale values less than the threshold are marked as background. For ease of marking, for example, background can be marked as 0, noise as 1, and flare as 2. The main purpose of using different symbols is to better identify flares from the background. Specifically, if the adjacent positions of a pixel are marked as background, it indicates that the pixel should be considered noise; if the pixel has already been marked as noise or a flare, it means that the current pixel is marked as a flare. The pixels to the left, above, and to the right of the current pixel are considered adjacent pixels.
[0043] Initialize the values of neighboring pixels, marking all neighboring pixels except those below as 0, and simultaneously read the value of the first pixel in the image. Compare the grayscale value of the current pixel with the preset grayscale threshold; If the grayscale value is greater than the preset grayscale threshold, the type of neighboring pixels is determined by the pixel values to the left and above the pixel. Further, if the pixel values to the left and above are equal to 0, it indicates that the pixel may be a noise pixel; otherwise, the current pixel is a spot, and it is marked as a valid spot (marked with a value of 2). The centroid parameter values corresponding to all spot pixels are accumulated. Further, it is determined whether a row of pixels is complete. If complete, the left pixel marker is initialized, and the image completion rate is judged. If the completion rate is less than 100%, the next row of pixels is read, and the next pixel is read as the current pixel. The grayscale value of the current pixel is then compared with the preset threshold again. If a row of pixels is not complete, the current pixel marker value is stored, the current pixel marker is updated, and the next row of pixels is read. The grayscale value of the current pixel is then compared with the preset grayscale threshold, and the judgment and adjustment are performed again.
[0044] If the value is less than or equal to the preset grayscale threshold, mark the current pixel as a background pixel (0). Then determine whether the pixel to the left of the current pixel is a spot pixel. When the pixel mark is greater than 1, it means that the spot pixel has ended. At this time, the centroid parameter group value of the pixel to the left of the current pixel should be stored. Determine whether a row of pixels is complete. If it is complete, initialize the left pixel mark. If it is not complete, store the current pixel mark value, update the current pixel mark, and complete the reading of the next pixel. If the mark value is less than or equal to 1, it means that the left pixel is a background pixel or a noise pixel. Determine whether a row of pixels is complete. If it is complete, initialize the left pixel mark and repeat the image completion judgment. Proceed to the next step based on the image completion.
[0045] The spot can be identified based on the pixel's identifier, and its centroid parameter value can be calculated using an accumulation algorithm. If the pixel is identified as background or noise, it will not participate in the accumulation operation. During this operation, noise can also be eliminated and the spot centroid extracted. If the completion rate is 100%, that is, after processing the entire image, the row and column coordinates of the spot centroid are calculated according to the following formula.
[0046] In the formula, This represents the total number of rows in the image. This represents the total number of columns in the image. This represents the grayscale value of the pixel. This represents the row number of the pixel's location. This represents the column number of the pixel's location. The coordinates of the centroid of the light spot The column coordinates of the spot centroid are represented by the total number of rows in the image, with the numerator and denominator representing the centroid parameter set values. The centroid coordinates of the spot image are calculated by accumulating the calculated centroid parameter set values. The coordinates of the spot image centroid can then be calculated according to a preset centroid formula.
[0047] Optionally, the preset model is a PID control model; in some embodiments, in S500, the preset control model is optimized based on the differential evolution algorithm to obtain optimized parameters, specifically including: within the reasonable range of PID parameters, M parameter combinations are randomly generated as an initial population and stored in the DDR cache of the FPGA.
[0048] S510, in the PID control model, randomly initializes and generates a population containing multiple individuals; S520 uses the differential evolution algorithm to iteratively optimize the population to obtain optimized parameters.
[0049] Therefore, the differential evolution algorithm is implemented in the FPGA to optimize PID parameters and adaptively adjust control parameters to adapt to dynamic changes in the system.
[0050] Specifically, in S520, the population is iteratively optimized using a differential evolution algorithm to obtain optimized parameters. This includes: To generate an initial population, M individuals satisfying the constraints are randomly generated in an n-dimensional space. The following measures are implemented: In the formula, and These are the upper and lower bounds of the j-th chromosome, respectively; It is a random decimal number between [0, 1].
[0051] S521, In each iteration, select one individual from the current population as the target individual and randomly select three distinct individuals; In each iteration, three distinct individuals are randomly selected, and a scaling factor is used to generate mutated individuals, where the three individuals are randomly selected from the population. , and ,and , Given the index of the currently selected "target individual" in the population, the basic mutation operation is as follows: If there is no local optimization problem, the mutation operation can be written as: In the formula, For the differential vector, this difference operation is the key to the differential evolution algorithm; This is the scaling factor; , , is a random integer representing the individual's index in the population; The best individual in the current generation of the population. This represents the number of iterations in the evolutionary process. For the first Generation Zhong, No. Individual, the first j The components correspond to the variant individuals in each dimension. Since the above formula borrows information from the best individuals in the current population, it can accelerate the convergence speed.
[0052] S522, based on the parameter difference between two randomly selected individuals and a preset scaling factor, the parameters of the remaining individuals are perturbed to generate mutated individuals; based on the parameter difference between two randomly selected individuals and a preset scaling factor, the parameters of the remaining individuals are perturbed to generate mutated individuals. S523, mix the mutated individuals and the target individuals according to the preset crossover probability to generate experimental individuals; Crossover operations are used to increase the diversity of a population. The specific operations are as follows: In the formula, CR is a random decimal number between [0, 1]; CR is the crossover probability. .
[0053] S524 Calculate and compare the control performance index values corresponding to the test individual and the target individual respectively to obtain the individual with better performance; use the time integral of the absolute value of error, the square term of the control input, and the overshoot penalty as performance indicators to compare the performance of the test individual and the target individual, and retain the better individual.
[0054] S525 retains the better-performing individuals for the next generation of the population to continue iterating; S526, when the iteration reaches the preset termination condition, the best performing individual in the population of all generations is obtained; for example, after iterating to the preset number of generations, the parameters of the best performing individual are output as optimization parameters.
[0055] Specifically, in order to determine Whether to become a member of the next generation, experimental vector and target vector Compare the evaluation functions: By repeatedly performing mutation, crossover, and selection operations until the maximum number of generations G is reached, the individual with the best performance is obtained.
[0056] S527 derives the parameters of the best-performing individual based on its performance, which are then used as optimization parameters. Thus, each generation updates the population through mutation, crossover, and selection, gradually approaching the optimal solution and improving the dynamic response performance and steady-state accuracy of the control system.
[0057] Furthermore, differential iteration can be performed after each miss, or the iteration process can be turned off and fixed controller parameters can be used. The time integral performance index of the absolute value of the error is used as the minimum objective function for parameter selection. To prevent excessive control energy, a squared term of the control input is added to the objective function. The following formula is selected as the optimal index for parameter selection.
[0058] In the formula, This is a systematic error; For controller output; and These are the weights; For performance metrics.
[0059] To avoid overshoot, a penalty function is employed; that is, once overshoot occurs, the overshoot amount is used as a metric for optimal performance. In this case, the optimal metric is: In the formula, For weights.
[0060] Therefore, this application improves upon the problems of slow centroid extraction speed and additional transmission delay caused by the transmission of the miss distance from the tracking mechanism to the tracking controller via serial port in the traditional quantum communication tracking control process by integrating the spot centroid extraction algorithm and the tracking closed-loop control algorithm into the same FPGA chip. This improves the control accuracy and bandwidth of the tracking control system. Using a single FPGA to complete miss distance extraction and tracking control can improve system integration, reduce system hardware costs and the number of wiring harnesses, and facilitate system miniaturization and weight reduction.
[0061] This application also provides an FPGA-based precision tracking control system, which includes an initialization module 100, an extraction module 200, a centroid calculation module 300, a deviation calculation module 400, an optimization module 500, a control quantity generation module 600, and an instruction generation module 700. Specifically, the initialization module 100 is used to acquire and initialize the image pixel dataset; the extraction module 200 is used to simultaneously classify, label, and extract parameters from the initialized image pixel data based on a preset grayscale threshold and neighborhood pixel relationships to obtain the centroid parameter values corresponding to each image pixel data, and generate a centroid parameter value group based on all the centroid parameter values; the centroid calculation module 300 is used to calculate the centroid parameter value group according to a preset centroid formula to obtain the spot centroid coordinates; the deviation calculation module 400 is used to acquire the center coordinates of the fine tracking field of view and perform deviation calculation with the spot centroid coordinates to obtain the real-time miss distance; the optimization module 500 is used to optimize the parameters of a preset control model based on a differential evolution algorithm to obtain optimized parameters; the control quantity generation module 600 is used to generate a mirror voltage control quantity based on the optimized parameters and the real-time miss distance; and the instruction generation module 700 is used to generate a mirror control instruction based on the mirror voltage control quantity.
[0062] Figure 9This is a schematic diagram of the structure of an FPGA-based fine tracking control device 800 provided in an embodiment of the present invention. The FPGA-based fine tracking control device 800 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 810 (e.g., one or more processors) and a memory 820, and one or more storage media 830 (e.g., one or more mass storage devices) for storing application programs 833 or data 832. The memory 820 and storage media 830 can be temporary or persistent storage. The program stored in the storage media 830 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the FPGA-based fine tracking control device 800. Furthermore, the processor 810 may be configured to communicate with the storage media 830 and execute the series of instruction operations in the storage media 830 on the FPGA-based fine tracking control device 800 to implement the steps of the FPGA-based fine tracking control method provided in the above-described method embodiments.
[0063] The FPGA-based precision tracking control device 800 may also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input / output interfaces 860, and / or one or more operating systems 831, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand. Figure 9 The device structure shown does not constitute a limitation on FPGA-based precision tracking control devices and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0064] This application provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of an FPGA-based fine tracking control method.
[0065] The preferred embodiments of the present invention have been described in detail above, but the present disclosure is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of the present disclosure.
Claims
1. A precision tracking control method based on FPGA, characterized in that: include: Obtain the image pixel dataset and initialize the image pixel dataset; Based on the preset grayscale threshold and neighborhood pixel relationship, the initialized image pixel dataset is simultaneously classified, labeled and parameter extracted to obtain the centroid parameter values corresponding to the image pixel data, and a centroid parameter value group is generated based on all the centroid parameter values. The centroid parameter value set is calculated according to the preset centroid formula to obtain the centroid coordinates of the light spot; Obtain the coordinates of the center of the fine tracking field of view and calculate the deviation between them and the coordinates of the centroid of the light spot to obtain the real-time miss distance; The parameters of the preset control model are optimized based on the differential evolution algorithm to obtain the optimized parameters; Based on optimized parameters and real-time target miss distance, the reflector voltage control quantity is generated; Based on the mirror voltage control quantity, generate mirror control commands.
2. The FPGA-based fine tracking control method according to claim 1, characterized in that: The neighborhood pixel relationship includes the pixels to the left and above the current pixel; based on a preset grayscale threshold and neighborhood pixel relationship, the initialized image pixel data is synchronously classified, labeled, and parameter extracted to obtain the centroid parameter values corresponding to each image pixel data, specifically including: Read each pixel in the initialized image pixel dataset in a preset order and obtain the grayscale value of the current pixel in sequence; For each current pixel, its grayscale value is compared with a preset grayscale threshold, and the classification label of the current pixel is determined based on the comparison result and the labeling status of the pixels to its left and above. If the current pixel is classified as a spot pixel, the parameter information of the current pixel is obtained and accumulated into a set of preset centroid accumulators to obtain the centroid parameter value corresponding to the current pixel.
3. The FPGA-based fine tracking control method according to claim 2, characterized in that: For each current pixel, its grayscale value is compared with a preset grayscale threshold, and the classification label of the current pixel is determined based on the comparison result and the labeling status of the pixels to its left and above. Specifically, this includes: Based on a preset grayscale threshold, the grayscale value of the current pixel is compared with the grayscale threshold. If the grayscale value of the current pixel is less than or equal to the grayscale threshold, then the current pixel is marked as a background pixel; If the gray value of the current pixel is greater than the gray value threshold, then obtain the marking information of the pixels to the left and above the current pixel and make a marking judgment. If the pixels to the left and above the current pixel are both marked as background pixels, then the current pixel is marked as a noise pixel; If the pixels to the left and above the current pixel are both noise pixel markers or spot pixel markers, then the current pixel is marked as a spot pixel.
4. The FPGA-based fine tracking control method according to claim 2, characterized in that: If the current pixel is classified as a spot pixel, then the parameter information of the current pixel is obtained and accumulated into a set of preset centroid accumulators, specifically including: If the current pixel is classified as a spot pixel, then obtain the grayscale value, row coordinates, and column coordinates of the current pixel; The grayscale value, row coordinate, and column coordinate of the current pixel are accumulated into a set of preset centroid accumulators.
5. The FPGA-based fine tracking control method according to claim 1, characterized in that: The calculation of the centroid parameter value set according to the preset centroid formula to obtain the centroid coordinates of the light spot specifically includes: Extract the centroid parameter value set to obtain centroid parameter data; The centroid parameter data and the preset centroid formula are calculated to obtain the row and column coordinates of the spot centroid; The row and column coordinates are integrated to obtain the centroid coordinates of the light spot.
6. The FPGA-based fine tracking control method according to claim 1, characterized in that: The preset control model is a PID control model; the parameter optimization of the preset control model based on the differential evolution algorithm to obtain optimized parameters specifically includes: In the PID control model, a population containing multiple individuals is randomly initialized. The population is iteratively optimized using the differential evolution algorithm to obtain optimal parameters.
7. The FPGA-based fine tracking control method according to claim 6, characterized in that: The iterative optimization of the population based on the differential evolution algorithm to obtain optimized parameters specifically includes: In each iteration, one individual is selected from the current population as the target individual, and three distinct individuals are randomly selected. Based on the parameter difference between two randomly selected individuals and a preset scaling factor, the parameters of the remaining individuals are perturbed to generate mutated individuals; The mutant individuals and the target individuals are mixed with parameters according to a preset crossover probability to generate experimental individuals; The control performance index values for the experimental individuals and the target individuals were calculated and compared to identify the individuals with better performance. Individuals with better performance will be retained and carried over to the next generation of the population for further iteration. When the iteration reaches the preset termination condition, the best performing individual in the population across all generations is obtained. The parameters of the best-performing individual are obtained based on the best-performing individual and used as optimization parameters.
8. A precision tracking control system based on FPGA, characterized in that: include: The initialization module is used to acquire the image pixel dataset and initialize the image pixel dataset; The extraction module, based on a preset grayscale threshold and neighborhood pixel relationships, synchronously classifies, labels, and extracts parameters from the initialized image pixel data to obtain the centroid parameter values corresponding to each image pixel data, and generates a centroid parameter value group based on all the centroid parameter values. The centroid calculation module is used to calculate the centroid parameter value set according to the preset centroid formula to obtain the centroid coordinates of the light spot; The deviation calculation module is used to obtain the coordinates of the center of the fine tracking field of view and calculate the deviation with the coordinates of the centroid of the spot to obtain the real-time miss distance; The optimization module is used to optimize the parameters of a preset control model based on the differential evolution algorithm to obtain optimized parameters. The control quantity generation module is used to generate the mirror voltage control quantity based on the optimized parameters and the real-time target miss distance; The instruction generation module is used to generate mirror control instructions based on the mirror voltage control quantity.
9. A precision tracking control device based on FPGA, characterized in that: When the processor executes the computer program, it implements the steps of the FPGA-based fine tracking control method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, characterized in that, when executed by a processor, the instructions implement the steps of the FPGA-based fine tracking control method as described in any one of claims 1-7.