Data processing method of double femtosecond laser ranging system based on improved NAG algorithm of FPGA

Through the improved pipeline structure implemented by NAG algorithm and hardware, the problem of large resource consumption of BFGS algorithm is solved, and the accuracy and resource utilization of the dual-femtosecond laser ranging system are significantly improved, achieving more efficient data processing.

CN119291706APending Publication Date: 2025-01-10GUILIN UNIVERSITY OF TECHNOLOGY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411463060.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-20
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the existing data processing method of dual femtosecond laser ranging system based on FPGA, although the BFGS algorithm has high accuracy, the hardware resource utilization rate is high, resulting in large resource consumption, making it difficult to improve accuracy and reduce resource consumption at the same time.

Method used

Using improved NAG algorithm, select the optimal learning rate and learning rate decay rate through Python grid search, combine the pipeline structure implemented by hardware to perform pulse envelope reconstruction and parameter fitting, reduce the consumption of hardware resources, and improve the distance measurement Accuracy.

Benefits of technology

It significantly reduces the consumption of hardware resources, improves the ranging accuracy and system performance, and improves the fitting results of NAG algorithm to reduce the deviation standard deviation by 1.68%, and the mean of deviation is reduced by 38.03%, improving the overall performance and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119291706A_ABST
    Figure CN119291706A_ABST
Patent Text Reader

Abstract

The invention provides a double femtosecond laser ranging system data processing method based on an improved NAG algorithm of an FPGA. The method comprises the following steps: step 1, obtaining observation data points and calibrating the observation data points; 2, performing grid search by using Python to select an optimal learning rate and a learning rate attenuation rate; step 3, realizing an improved NAG algorithm on an FPGA platform, and performing discrete point fitting to calculate a pulse peak moment; and 4, substituting the pulse peak moment into a formula to obtain a distance value. According to the invention, an improved NAG algorithm is adopted to carry out optimization processing, and pipeline design of a hardware architecture and cooperative work of a plurality of modules are realized. Aiming at the problems of low ranging precision and high hardware resource occupancy rate in the existing double femtosecond laser ranging system, the method of the improved NAG algorithm is adopted for optimization processing, the pulse peak moment can be more accurately measured to better measure the distance, and meanwhile, the utilization rate of FPGA resources is remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the fields of signal processing and laser ranging, and in particular to a data processing method of a double-femtosecond laser ranging system based on an improved NAG algorithm of FPGA. Background Art

[0002] With its advantages of high precision and fast update, dual-femtosecond laser ranging technology has become an advanced method for absolute distance measurement and is widely used in atmospheric monitoring, lidar, satellite tracking and other fields. With the high temporal resolution of femtosecond laser, this technology achieves extremely high-precision absolute distance measurement. However, in order to further promote its development and practical application, it is crucial to improve ranging accuracy and reduce resource utilization. Therefore, it is of great significance to study this direction.

[0003] At present, the data processing method of the FPGA-based dual-femtosecond laser ranging system mainly adopts the BFGS algorithm, which has been listed below.

[0004] Patent application number CN201911231885.5 discloses a hardware implementation of a data processing platform for a dual femtosecond laser ranging system. In this invention, the BFGS algorithm is used for pulse peak detection. The hardware structure of the peak detection module based on BFGS includes a calculation control module, an objective function evaluation module, a linear search module, a gradient calculation module, and a matrix update module. This module can reconstruct the pulse envelope to obtain the central moment corresponding to the pulse peak. However, the ranging accuracy of this invention needs to be improved, and the resource utilization needs to be reduced.

[0005] The paper "Peak Detection Based on FPGA Using Quasi-Newton Optimization Method for Femtosecond Laser Ranging" by Jiang Y et al. describes in detail the hardware architecture of the Caruana algorithm and the BFGS quasi-Newton algorithm to implement data processing of the dual femtosecond laser ranging system. The paper points out that the Caruana algorithm consumes less hardware resources when implemented on the hardware platform, but at the cost of precision loss. In contrast, the hardware architecture based on the BFGS quasi-Newton algorithm has less precision loss, but consumes more hardware resources.

[0006] The paper "Resource Reduction of BFGS Quasi-Newton Implementation on FPGA using Fixed-Point Matrix Updating" by Jia Liu et al. introduces a hardware implementation of the BFGS Quasi-Newton method on FPGA, mainly by using fixed-point matrix updates to reduce resource consumption. However, the update process of its inverse Hessian matrix is ​​very computationally and memory intensive. To address this issue, the paper proposes a fixed-point hardware design for updating the B matrix, and combines it with the remaining floating-point modules to form a mixed-precision BFGS-QN implementation, reducing resource utilization.

[0007] In the prior art, the BFGS algorithm has high accuracy, but has high consumption in terms of hardware resource utilization. Therefore, the present invention proposes a data processing method for a double femtosecond laser ranging system based on an improved NAG algorithm based on FPGA, which aims to significantly reduce the resource utilization of the BFGS algorithm while significantly improving the accuracy. Through this improvement, the consumption of hardware resources can be significantly reduced while ensuring the improvement of accuracy, thereby improving the overall performance and efficiency of the system. Summary of the invention

[0008] In view of the above problems, the purpose of the present invention is to provide a data processing method for a double femtosecond laser ranging system based on an improved NAG algorithm of FPGA, which can significantly improve the ranging accuracy and reduce the utilization rate of FPGA resources compared with the BFGS algorithm. The invention can reconstruct the pulse envelope, thereby obtaining the central moment corresponding to the pulse peak, and thus obtaining the distance value to be measured.

[0009] The specific technical solution of the present invention is:

[0010] Step 1: Data preparation. Use a dual-femtosecond laser rangefinder to obtain discrete sampling points (xi, yi) of the pulse signal, where xi represents the timestamp and yi represents the corresponding measurement value. These data will be used for subsequent pulse peak moment resolution and distance calculation. At the same time, the parameters measured by the standard interferometer are regarded as the true value of the distance to evaluate the accuracy of the algorithm.

[0011] Step 2: Use Python to use grid search to select the combination with the lowest loss and use the improved NAG algorithm to train and obtain the optimal learning rate and learning rate decay rate λ, and input them into FPGA as initial parameters.

[0012] Step 3: On the FPGA platform, based on the collected discrete sampling points, the improved NAG algorithm implemented in hardware is used to reconstruct the envelope of the pulse signal, and the fitting parameters are iteratively calculated to obtain the central time t corresponding to the pulse peak.

[0013] 1) Initialization: Use the optimal learning rate And the learning rate decay rate λ is initialized.

[0014] 2) Look-ahead position calculation:

[0015] (1)

[0016] (2)

[0017] Formulas (1) and (2) involve forward position calculations, which are used to predict the possible position of the next step. is the momentum vector, is the momentum factor, is the look-ahead position vector, is the input parameter vector, is the peak value of the Gaussian function, is the standard deviation, is the mean value indicating the center position of the Gaussian function, is the offset.

[0018] 3) Objective function calculation:

[0019] (3)

[0020] (4)

[0021] Formula (3) describes a Gaussian function, and formula (4) is its expression for calculating the objective function, which is the sum of squared errors between the model output and the actual observed data. represents the value of the Gaussian function, is the objective function.

[0022] 4) Gradient calculation:

[0023] (5)

[0024] (6)

[0025] Formulas (5) and (6) mainly involve the calculation of the gradient norm, using the forward difference method, which is often used in hardware to avoid complex symbolic derivation. is the gradient, that is, the rate of change of the function in different directions, , , , yes Each element of yes The rth component in, where r=1,2,3,4, The parameter change is a small perturbation value used in gradient calculation.

[0026] 5) Jump out of judgment:

[0027] (7)

[0028] (8)

[0029] Formula (7) involves the calculation of the gradient norm, and formula (8) involves the judgment of the jump condition. If the gradient norm Less than threshold , it means that the function value is close enough to the optimal solution and meets the exit condition. Greater than or equal to the maximum number of iterations , then the exit condition is also met. As long as any of the above two conditions is true, the optimization process will stop. is the norm of the gradient, is the maximum number of iterations.

[0030] 6) Learning rate decay:

[0031] (9)

[0032] Formula (9) is used to express the learning rate attenuation strategy, which describes how to adjust the learning rate according to the number of iterations during the iterative optimization process. is the decay rate, K is the number of iterations, is the optimal learning rate, is the learning rate at the Kth iteration.

[0033] 7) Momentum Update:

[0034] (10)

[0035] (11)

[0036] Formulas (10) and (11) describe the momentum update process. is the gradient, is the updated momentum vector.

[0037] 8) Parameter update:

[0038] (12)

[0039] Formula (12) describes the parameter update process. is the updated parameter vector.

[0040] The double femtosecond laser ranging system based on the improved NAG algorithm of FPGA reads the sampled data from the memory, reconstructs the pulse envelope, calculates the fitting parameters by iterative method, obtains the central time t corresponding to the pulse peak, and outputs the peak time of each pulse. The hardware implementation includes: calculation control module, forward position calculation module, objective function calculation module, gradient calculation module, jump judgment module, learning rate decay module, momentum update module, parameter update module, and adopts pipeline structure.

[0041] Step 4: Get the reference pulse peak time , target pulse peak time , and the next cycle reference pulse peak time , input the distance calculation module, and substitute the following formula to calculate the distance L to be measured:

[0042] (13)

[0043] Where c is the speed of light in vacuum, is the refractive index of air, Represents the repetition frequency of the signal laser, which are all known quantities measured in advance.

[0044] Beneficial Effects

[0045] (1) Error assessment

[0046] Through simulation comparison, the improved NAG algorithm of the present invention is significantly better than the BFGS algorithm in fitting accuracy. Compared with the BFGS algorithm, the improved NAG algorithm reduces the standard deviation of the fitting result by about 1.68%, and the mean deviation by about 38.03%, which significantly improves the fitting accuracy. This shows that the improved NAG algorithm has higher accuracy and reliability in the double femtosecond laser ranging system. The specific accuracy comparison is as follows:

[0047] Table 1: Comparison of the accuracy of the BFGS algorithm and the improved NAG algorithm

[0048]

[0049] (2) Hardware resource utilization

[0050] The present invention adopts Xilinx FPGA chip, and uses the Verilog hardware language on the Vivado2020.2 software platform through Xilinx's EDA tool Vivado to perform functional simulation and logic synthesis. Through experiments, the resource utilization of the improved NAG algorithm of the present invention on FPGA is significantly reduced compared with the existing BFGS algorithm. The specific hardware resource utilization is as follows:

[0051] Table 2: Comparison of hardware resource utilization of BFGS parallel computing solution, BFGS pipeline computing solution and improved NAG algorithm

[0052]

[0053] The detailed description and simulation results of the present invention show that the application of the improved NAG algorithm in the double-femtosecond laser ranging system not only has a significant improvement in calculation accuracy, but also shows obvious advantages in FPGA resource utilization, providing a new implementation method for efficient double-femtosecond laser ranging system data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is a step diagram of the method described in the present invention.

[0055] Figure 2 This is a block diagram of the hardware modules of the improved NAG algorithm of the present invention.

[0056] Figure 3 FIG. 4 is a hardware architecture diagram of the forward-looking position calculation module of the present invention.

[0057] Figure 4 This is a hardware architecture diagram of the objective function calculation module of the present invention.

[0058] Figure 5 FIG. 4 is a hardware architecture diagram of the gradient calculation module of the present invention.

[0059] Figure 6 This is a hardware architecture diagram of the jump judgment module of the present invention.

[0060] Figure 7 This is a hardware architecture diagram of the learning rate decay module of the present invention.

[0061] Figure 8 FIG. 4 is a hardware architecture diagram of the momentum update module of the present invention.

[0062] Fig. 9 FIG. 4 is a hardware architecture diagram of the parameter updating module of the present invention.

[0063] Fig.10 The figure is the fitting results of the simulation of the two peak detection algorithms compared with the present invention. DETAILED DESCRIPTION

[0064] The present invention proposes a data processing method for a data processing platform of a double femtosecond laser ranging system, as shown in the attached Figure 1 The figure shows the steps of the method of the present invention, and the specific technical scheme is:

[0065] Step 1: Data preparation, using a dual-femtosecond laser rangefinder to obtain discrete sampling points (xi, yi) of the pulse signal, where xi represents the timestamp and yi represents the corresponding measurement value. These data will be used for subsequent pulse peak moment resolution and distance calculation. At the same time, the parameters measured by the standard interferometer are regarded as the true value of the distance to evaluate the accuracy of the algorithm.

[0066] Step 2: Use Python to use grid search to select the combination with the lowest loss and use the improved NAG algorithm to train and obtain the optimal learning rate and learning rate decay rate λ, and input them into FPGA as initial parameters.

[0067] Step 3: Use hardware to implement the improved NAG algorithm on the FPGA platform, perform discrete point fitting, and obtain the peak moment. The FPGA-based improved NAG algorithm proposed in the present invention uses an iterative method to calculate the fitting parameters, k represents the number of iterations, and according to the calculation steps of the NAG algorithm, the hardware architecture of the algorithm can be divided into a calculation control module, a forward position calculation module, an objective function calculation module, a gradient calculation module, a jump judgment module, a learning rate decay module, a momentum update module, and a parameter update module.

[0068] As attached Figure 2 The figure shows the interconnection relationship of each specific module and the transmission relationship of related internal variables. In the hardware architecture of the improved NAG quasi-Newton algorithm, the calculation control module controls the execution order of all other modules by designing an optimized finite state machine, uses a dynamic allocation strategy to call the on-chip BRAM to cache the calculation results of internal variables between modules, and efficiently transmits data between different modules; the forward position calculation module calculates the so-called forward position, which takes into account the momentum of the previous step and predicts the possible position of the next step; the objective function calculation module calculates the objective function of Gaussian fitting in the process of pulse envelope reconstruction, and the objective function is the sum of squared errors between the observed value and the fitted value; the gradient calculation module uses the forward difference method to calculate the current gradient; the jump judgment module determines whether the jump condition is met; the learning rate decay module calculates the learning rate of the current iteration; the momentum update module updates the momentum based on the current gradient and the momentum of the previous step. The momentum term helps the algorithm overcome small local irregularities and improve the convergence speed; the parameter update module uses the updated momentum to update the parameter position, which is the actual parameter movement step.

[0069] Each module of the system processes data in a pipeline manner, that is, the processing process is divided into multiple consecutive stages, and these stages can process different data simultaneously to improve the overall processing speed and efficiency of the system.

[0070] The workflow is as follows:

[0071] (1) Sampling data points (xi, yi) and initial parameters λ, , input calculation control module;

[0072] (2) Calculate the so-called look-ahead position, which takes into account the momentum of the previous step and predicts the possible position of the next step;

[0073] (3) Calculate the gradient of the objective function at the predicted position. This step is the core of gradient descent and is used to determine the direction of the fastest descent of the objective function at the current position;

[0074] (4) The jump judgment module outputs the evaluation result of whether to jump out;

[0075] (5) Calculate the learning rate of the current iteration;

[0076] (6) Update the momentum based on the current gradient and the momentum of the previous step;

[0077] (7) Use the updated momentum to update the parameter position, which is the actual parameter movement step;

[0078] (8) The calculation control module determines whether the result output by the judgment module meets the exit condition. If so, the peak moment fitting result is output. If not, step (2) of the workflow is repeated.

[0079] The following will introduce in detail the hardware architecture of each functional module on the FPGA platform. The specific hardware implementation scheme is as follows:

[0080] 1) Forward position calculation module. Figure 3 The hardware architecture of the forward-looking position calculation module is shown in FIG. is the momentum vector, is the momentum factor, set to 0.9, and Input to the multiplier and then to the adder and Add the momentum updated forward position vector .

[0081] 2) Objective function calculation module. Figure 4 The hardware architecture of the objective function calculation module is shown in Figure 1, which is implemented in two parts: the first part is based on the forward position Get the Gaussian function value, and the second part calculates the objective function The hardware architecture is the hardware design of the Gaussian function value calculation unit. and It is a parallel calculation. The lower part of the hardware architecture is the hardware design of the objective function calculation unit. Use a multiplexer to select the fitted value and the amplitude of the corresponding sampling data point in turn to flow into the subtractor for subtraction to obtain the difference between the two. Then input the vector multiplication (VVM) unit for square sum operation to obtain the objective function value, that is, the sum of squares of the error between the observed value and the fitted value.

[0082] 3) Gradient calculation module. Figure 5 The figure shows the hardware architecture of the gradient calculation module. After the objective function calculation module completes the calculation, the gradient calculation module starts to calculate. The gradient calculation module adopts the forward difference design. is the look-ahead position vector, each element of which is controlled by a multiplexer Add separately (0.00001), get 4 sets of new vectors, and store the calculation results in RAM. Directly stored in RAM. Call two sets of objective function evaluation modules for parallel calculation, and the two sets of calculation result sequences are transmitted to the two ends of the subtractor in turn, and finally input to the multiplier and Multiply to get the gradient of the objective function at the forward position .

[0083] 4) Jump out of the judgment module. Figure 6 The hardware architecture of the jump judgment module is shown. Input the vector multiplication (VVM) unit for square sum operation, and then input the square root operation sqrt unit to get the norm of the gradient , and then with the preset threshold The common input comparator compares the gradient norm to the preset threshold. If it is, output 1, otherwise output 0, the result is stored in RAM, and the current number of iterations is entered. With the maximum number of iterations The common input comparator compares and the result is stored in RAM. When the current iteration number is greater than or equal to the maximum iteration number, 1 is output, otherwise 0 is output and the result is stored in RAM. Finally, the two comparison results stored in RAM are read and input into the OR operation to perform a logical OR operation. If any comparison result is true, the logical OR operation outputs 1, otherwise 0 is output.

[0084] 5) Learning rate decay module. Figure 7 The hardware architecture of the learning rate decay module is shown. is the decay rate, K is the number of iterations, The optimal learning rate, and K are input into the two ends of the multiplier respectively, and then input into the exponential operator (exp). Input the multipliers separately to get the learning rate at the Kth iteration .

[0085] 6) Momentum update module. Figure 8 The hardware architecture of the momentum update module is shown in Figure 2. is the gradient, , and , input to both ends of the multiplier, and Input the multiplier at both ends, and the result of both is input to the subtractor at both ends to get the updated momentum vector .

[0086] 7) Parameter update module. Fig. 9 The hardware architecture of the parameter update module is shown, using the updated momentum and parameter vector The updated parameter vector is input to both ends of the adder .

[0087] Step 4: Get the reference pulse peak time , target pulse peak time , and the next cycle reference pulse peak time , input the distance calculation module and substitute the formula to calculate the distance value L to be measured.

[0088] The above embodiments are only used to illustrate the present invention, but not to limit the present invention. A person skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the present invention, and the patent protection scope of the present invention shall be defined by the claims.

[0089] The technical contents not described in detail in the present invention are all known technologies.

Claims

1. A data processing method for a double femtosecond laser ranging system based on an improved NAG algorithm of FPGA, characterized in that: Applied to the dual femtosecond laser ranging system, including the following steps: Step 1: Data preparation: Use a dual-femtosecond laser rangefinder to obtain discrete sampling points (xi, yi) of the pulse signal, where xi represents the timestamp and yi represents the corresponding measurement value. These data will be used for subsequent pulse peak moment resolution and distance calculation. At the same time, the parameters measured by the standard interferometer are regarded as the true value of the distance to evaluate the accuracy of the algorithm. Step 2: Use Python to use grid search to select the combination with the lowest loss and use the improved NAG algorithm to train to obtain the optimal learning rate and learning rate decay rate, and input them into the FPGA as initial parameters; Step 3: On the FPGA platform, based on the collected discrete sampling points, the improved NAG algorithm implemented in hardware is used to reconstruct the envelope of the pulse signal, and the fitting parameters are iteratively calculated to obtain the central moment corresponding to the pulse peak. The hardware implementation includes a calculation control module, a forward position calculation module, an objective function calculation module, a gradient calculation module, a jump judgment module, a learning rate decay module, a momentum update module, and a parameter update module, forming a complete algorithm execution process; the peak moment of the pulse envelope reconstruction is calculated through the synergy of each module; Step 4: Input the peak moment into the distance calculation module and combine it with the preset physical formula to obtain the distance value.

2. The method according to claim 1, characterized in that The computing control module controls the execution order of each module through an optimized finite state machine, manages the data reading, processing and storage of each step through state transition, realizes orderly operation between modules, and ensures the correct transmission of data between modules; controls the data transmission of each module in hardware through a dynamic allocation strategy, and the dynamic allocation strategy dynamically allocates and manages cache in the on-chip BRAM, stores and transmits the calculation results of internal variables between modules, allocates storage space as needed, improves the efficiency of data transmission and the utilization rate of hardware resources, and avoids waste of resources.

3. The method according to claim 1, characterized in that The forward-looking position calculation module is used to predict the possible position of the next step by combining the current momentum vector and the position at the previous moment.

4. The method according to claim 1, characterized in that: The objective function calculation module uses a Gaussian function for fitting, combined with hardware optimization design.

5. The method according to claim 1, characterized in that: The gradient calculation module implements gradient calculation using a forward difference method.

6. The method according to claim 1, characterized in that The jump-out judgment module judges whether the iterative jump-out condition is met by calculating the gradient norm and evaluating the preset conditions.

7. The method according to claim 1, characterized in that The learning rate decay module is combined with the momentum update module to dynamically adjust the convergence speed of the optimization algorithm.

8. The method according to claim 1, characterized in that: The parameter updating module uses the updated momentum vector to update the parameter vector and calculates new parameter values ​​to iteratively approximate the optimal solution of the objective function.

9. The method according to claim 1, characterized in that: Each module of the system processes data in a pipeline manner, that is, the processing process is divided into multiple consecutive stages, and these stages are enabled to process different data simultaneously, so as to improve the overall processing speed and efficiency of the system.

Citation Information

Patent Citations

  • Implementation of double femtosecond laser ranging system data processing platform

    CN111190190A