CN111103686A - Method for realizing self-adaptive optical SPGD control algorithm based on FPGA - Google Patents

Method for realizing self-adaptive optical SPGD control algorithm based on FPGA Download PDF

Info

Publication number
CN111103686A
CN111103686A CN201911424233.3A CN201911424233A CN111103686A CN 111103686 A CN111103686 A CN 111103686A CN 201911424233 A CN201911424233 A CN 201911424233A CN 111103686 A CN111103686 A CN 111103686A
Authority
CN
China
Prior art keywords
fpga
disturbance
random
deformable mirror
performance index
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911424233.3A
Other languages
Chinese (zh)
Other versions
CN111103686B (en
Inventor
杨慧珍
吴阳
徐奇
龚成龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Marine Resources Development Institute Of Jiangsu (lianyungang)
Jiangsu Ocean University
Original Assignee
Marine Resources Development Institute Of Jiangsu (lianyungang)
Jiangsu Ocean University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Marine Resources Development Institute Of Jiangsu (lianyungang), Jiangsu Ocean University filed Critical Marine Resources Development Institute Of Jiangsu (lianyungang)
Priority to CN201911424233.3A priority Critical patent/CN111103686B/en
Publication of CN111103686A publication Critical patent/CN111103686A/en
Application granted granted Critical
Publication of CN111103686B publication Critical patent/CN111103686B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B27/00Optical systems or apparatus not provided for by any of the groups G02B1/00 - G02B26/00, G02B30/00
    • G02B27/0012Optical design, e.g. procedures, algorithms, optimisation routines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/582Pseudo-random number generators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Optics & Photonics (AREA)
  • Mechanical Light Control Or Optical Switches (AREA)

Abstract

The invention relates to a method for realizing a wavefront-free detection self-adaptive optical SPGD control algorithm based on an FPGA, which comprises the following steps: the random disturbance module generates a plurality of groups of pseudo-random sequences by means of Matlab software (not limited to Matlab), and each group of sequences is multiplied by disturbance voltage and added with corresponding signs in the FPGA to generate positive disturbance and negative disturbance; the performance index function calculation module selects the average Radius MR-Mean Radius of the far-field light spot as a performance index function; and the computation deformable mirror voltage control module collects image data and computes a performance index function after disturbance application is finished, performs gradient estimation on the computed performance index function, and then computes a control voltage according to a formula. The method disclosed by the invention is widely applicable to the self-adaptive optical system with any unit number, improves the universality of the mode of realizing the SPGD control algorithm by the FPGA, and ensures the correction capability of the wavefront-free detection self-adaptive optical system.

Description

Method for realizing self-adaptive optical SPGD control algorithm based on FPGA
Technical Field
The invention belongs to the technical field of adaptive optics, relates to a wavefront-free detection adaptive optics system, and particularly relates to a method for realizing an adaptive optics SPGD control algorithm based on an FPGA.
Background
Vorotstov, m.a. of the american army institute, proposes a Stochastic Parallel Gradient Descent (SPGD) algorithm and applies the algorithm to the field of adaptive optics. The SPGD-based wavefront-free detection adaptive optical system does not need wavefront measurement and phase reconstruction, and complexity of the system is reduced. The application field of the adaptive optics technology is further expanded, and particularly the application field of the conventional adaptive optics system cannot be applied.
The correction speed is one of important indexes of the correction capability of the adaptive optics system, and the SPGD control algorithm searches for an optimal solution in an iterative mode. Therefore, the iteration speed of the algorithm plays a key role in the correction capability of the adaptive optics system, and the implementation mode of the algorithm has a decisive influence on the iteration speed. In addition, the diversity of the application environment requires that the implementation of the algorithm has certain versatility. Therefore, the implementation of the SPGD algorithm needs to satisfy both the requirements of real-time performance and flexibility.
The SPGD control algorithm in the adaptive optics system is implemented in two ways: firstly, the method is realized on a general PC by using a software programming method, and has the advantages of simple realization, strong flexibility and the like, but Windows operated by the PC is a micro-kernel, preemptive multitask and soft real-time operating system, and tasks are scheduled according to the priority order of threads, so that the real-time performance of the whole system is weak. And secondly, the method is realized in a hardware mode. The SPGD control algorithm is realized by using an Analog Very Large Scale Integration (VLSI) circuit by M.A.Vorontsov et al, the method has high iteration speed and strong real-time property, meets the requirements of an adaptive optical system, but has complex circuit design, high chip cost and lack of flexibility.
Zhang jin Bao, Zhang super et al use FPGA to realize SPGD control algorithm. The FPGA is a programmable integrated circuit, the functions of the FPGA are expressed by a hardware description language, the FPGA can be configured into a hardware circuit capable of finishing specific functions (such as SPGD control algorithm), the FPGA has the characteristics of repeated programming, flexible algorithm realization and the like, and the essence of a special hardware circuit can also ensure the requirement of real-time performance. However, the existing mode of realizing the SPGD control algorithm by the FPGA is only for a specific deformable mirror, and the application range is limited. In addition, in the prior art, matrix recovery is not performed on image data serially transmitted into the FPGA, which causes that part of performance index functions cannot be realized by the FPGA or the realization mode is not accurate, and reduces the universality of the SPGD control algorithm realized by the FPGA. Meanwhile, the performance index function in the prior art is not accurate, which affects the correction capability of the adaptive optical system.
The invention content is as follows:
the technical problem to be solved by the invention is to overcome the defects of the prior art and provide the implementation method of the wavefront-free detection adaptive optical SPGD control algorithm based on the FPGA, the application range of the method is wide and the method is applicable to adaptive optical systems with any unit number, the universality of the SPGD control algorithm implementation mode of the FPGA is improved, and the correction capability of the wavefront-free detection adaptive optical system is ensured.
The technical problem to be solved by the present invention is achieved by the following technical means. The invention relates to a method for realizing a wavefront-free detection self-adaptive optical SPGD control algorithm based on an FPGA, which is characterized by comprising the following steps of:
(1) the random disturbance module generates a plurality of groups of pseudo-random sequences by means of software (including but not limited to Matlab software), multiplies each group of sequences by disturbance voltage in the FPGA and adds corresponding signs to generate positive disturbance and negative disturbance;
(2) selecting the average Radius MR-Mean Radius of the far-field light spot as a performance index function, wherein the performance index function is not limited to MR;
Figure BDA0002353145430000031
wherein (x)0,y0) Is the centroid of the spot;
Figure BDA0002353145430000032
i (x, y) represents the pixel gray value at the corresponding coordinate (x, y); the ROI area of the spot is NXN, so x, y ∈ [1, N ∈];
(3) A voltage control module for calculating the deformable mirror according to a formula u(n+1)=u(n)-γΔu(n)ΔJ(n)And calculating control voltage, optimizing the performance index function MR in the direction of the minimum value, and taking a positive value for gamma.
The invention relates to a method for realizing a wavefront-free detection self-adaptive optical SPGD control algorithm based on an FPGA, which further adopts the preferable technical scheme that:
the characteristics of random disturbance voltage in the SPGD algorithm provide corresponding requirements for generating a plurality of groups of pseudo-random sequences by Matlab software (not limited to Matlab):
a. the number of paths is equal to the number of deformable mirror units; n paths of pseudo-random sequences are needed for the deformable mirror with N units;
b. the pseudo-random sequences are mutually independent in pairs; the driving units are independent to each other, so that mutual coupling among the driving units of the deformable mirror can be avoided;
c. the pseudorandom sequence follows a bernoulli distribution with a probability of two sample values each of 0.5.
The SPGD control algorithm adds random parallel disturbance to the multipath control parameters, and searches the control parameters by using the variation of the performance index measured value and the variation of the control parameters.
The invention relates to a wavefront-detection-free self-adaptive optical SPGD control method based on an FPGA, which adopts the following steps to realize an SPGD control algorithm:
(1) generating a random number sequence by software and storing the random number sequence into a development board of the FPGA;
(2) FPGA reads random sequence and generatesDisturbance-dependent voltage { Δ un},(j=1,...,N,|Δu(n)|=0.2,sgn(Δu(n))=±1);
(3) FPGA (field programmable Gate array) applies positive disturbance u to deformable mirror(n)+Δu(n),u(n)The control voltage is calculated in the (n-1) th iteration, image data is collected, and a performance index function is calculated
Figure BDA0002353145430000041
(4) FPGA (field programmable Gate array) applies negative disturbance u to deformable mirror(n)-Δu(n)Acquiring image data, calculating performance index function
Figure BDA0002353145430000042
(5) Calculating the variation of the performance index function in the steps (3) and (4)
Figure BDA0002353145430000043
Calculating the gradient gamma delta u according to the variation(n)ΔJ(n)According to the formula u(n+1)=u(n)-γΔu(n)ΔJ(n)Completing the calculation of the control voltage of the deformable mirror;
and (5) repeating the steps (3) to (5) for a plurality of iterations until the optimal control voltage of the deformable mirror is found, so that the sum of the initial aberration (psi (r)) and the correction phase (m (r)) of the deformable mirror approaches to 0.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention realizes the SPGD control algorithm by utilizing the FPGA, is convenient to realize and has certain flexibility, and can ensure the requirement of the algorithm on real-time property.
2. According to the invention, the image data is stored in the address bit of the ROM core in the FPGA, the judgment condition is set, the matrix recovery is carried out on the image data, the commonly used performance index function can be accurately realized by the FPGA, the universality of the SPGD control algorithm realizing mode of the FPGA is improved, and the correction capability of the wavefront-free detection adaptive optical system based on the SPGD control algorithm of the FPGA is not influenced by the calculation of the performance index function.
3. After the matrix recovery is finished, the image data is accurately positioned by using the two counters and some auxiliary signals, the relation between the image data and the matrix coordinates is specified in the FPGA, the compilation of the centroid calculation process is finished according to a centroid formula, and the centroid of the image matrix is accurately calculated. The method for realizing the MR calculation module by using the FPGA has higher accuracy, and the wavefront-free detection adaptive optical system based on the SPGD control algorithm of the FPGA has stronger correction capability.
4. Through theoretical analysis, the gain coefficient and the disturbance amplitude are both normal numbers. The invention multiplies the two in the preprocessing part to obtain a result of a normal number, and directly defines the constant in the FPGA, thereby reducing the use of multipliers, saving the internal resources of the FPGA, reducing the complexity of the algorithm and improving the calculation speed of the algorithm to a certain extent.
Drawings
FIG. 1 is a timing diagram for generating random perturbations;
FIG. 2 is a flow chart of the calculation of the performance indicator function MR;
FIG. 3 is a timing diagram of fractional computation of the performance indicator function MR molecules;
FIG. 4 is a flow chart of calculating a deformable mirror control voltage;
FIG. 5 is a timing diagram of a portion of calculating the deformable mirror control voltage;
fig. 6 is a structural block diagram of an experimental system of the FPGA-based wavefront-free detection adaptive optics SPGD control algorithm.
Detailed Description
The embodiments of the present invention will be further described below with reference to the accompanying drawings so that those skilled in the art can further understand the present invention.
The following embodiment takes a 97-unit deformable mirror as an example:
a module for generating random disturbance voltage:
fig. 1 is a timing diagram of a random perturbation module according to the present invention, where Clk is a system clock, and the implementation is performed as follows.
1. And the preprocessing part generates a plurality of sets of 97-way pseudorandom sequences (formed by combining 0 and 1) by utilizing a rand function by means of Matlab software but not limited to Matlab. And storing the generated sets of 97-way pseudo-random sequences for later use.
2. Taking one group of pseudo-random sequences as an example to calculate positive and negative disturbances, reading and storing the group of pseudo-random sequences into a ROM core of the FPGA. A counter cnt is set and read the pseudo-random sequence stored in the ROM as address bits (when cnt is equal to 0, it corresponds to the 1 st value of the 97 way pseudo-random sequence, and so on).
3. The value of the counter cnt corresponds to the 97-way pseudo-random sequence as shown in fig. 1, where Q represents a random sequence read from the ROM, and when cnt is equal to 0, the corresponding Q is output when cnt is equal to 2 (with a certain delay in reading data from the ROM). The Q between the two dotted lines in the figure is the 97-way pseudo-random sequence read from the ROM.
Q equals 0, the corresponding perturbation is 1, Q equals 1, the corresponding perturbation is-1, and the specific result is shown as signal d in FIG. 1, which is a total of 97 random combinations of 1 and-1. Since the value of Q is determined first, the corresponding value of d is delayed, and d between two dot-dash lines (labeled as start of generation of disturbance and completion of 97 disturbances) is determined to be the required 97 random disturbances with a disturbance amplitude of 1 by using a certain auxiliary signal.
5. On the basis of step 4, d is multiplied by 200 to obtain dv1 (positive perturbation) in fig. 1. 200 is the perturbation amplitude, which is defined as the binary fixed point decimal with the last 10 digits being decimal places, so 200 corresponds to an actual perturbation amplitude of 0.1953 (approximately 0.2).
6. The addition of a negative sign to each perturbation on the basis of dv1 yields the data dv2 in fig. 1 (negative perturbation).
And calculating two performance indexes:
fig. 2 is a flow chart of the calculation of the performance indicator function MR. In specific implementation, the method comprises the following steps:
1. image data (gray values of a spot image, and an ROI (region of interest) is N multiplied by N), and since the image data is transmitted to the interior of the FPGA in series, matrix recovery is needed before calculation. The image data is restored to an N × N matrix form with the address bits as the determination conditions.
2. Calculating the centroid, the formula of the centroid is
Figure BDA0002353145430000071
The calculation of the centroid according to the formula is calculated as follows:
(1) calculating the product of the coordinate value and the corresponding gray value according to the formulas (2) and (3):
Figure BDA0002353145430000072
Figure BDA0002353145430000081
vector X in the formula1Expressed is the product of the abscissa 1 and all the elements of the row 1 of the matrix (image grey values), and so on, the vector X2~XNAll that is represented is the product of the abscissa and all of the elements to which it corresponds. Vector Y1Representing the product of ordinate 1 and all the elements of column 1 of the matrix, and so on, vector Y2~YNAll that is represented is the product of the ordinate and all the elements to which it corresponds.
(2) Will vector X1~XNAll elements in the formula are added to obtain the formula sigmax,yThe result of calculation of xI (X, y) is sun _ XiWill vector Y1~YNAll elements in the formula are added to obtain the formula sigmax,yThe calculation result of yI (x, Y) is sun _ Yi
(3) Adding all the elements (image gray values) of the matrix to obtain a formula sigmax,yThe calculation result of I (x, y) is sun _ q.
(4) Performing division operation twice by using division IP core, wherein dividend is sun _ XiThe divisor sun _ q obtains the centroid coordinate x0Dividend is sun _ YiThe divisor sun _ q obtains the barycenter coordinate y0
3. Calculation of the molecular weight of MR
Figure BDA0002353145430000082
Wherein I (x, y) represents a gray scale value with coordinates of (x, y). The flow chart of the performance indicator function MR molecule stepwise calculation is shown in FIG. 2, a part of the time sequence chart is shown in FIG. 3, and the specific calculation process is as follows:
(1) another clock SCLK is generated from the clock Clk, which is a division of the clock Clk by N, and the relationship between the two is shown in fig. 3, where 1 cycle of the SCLK clock contains N Clk clock cycles.
(2) And designing a y _ cnt counter by taking the Clk as a time sequence, wherein the counter starts counting from 0, the rising edge of the Clk triggers, the counter is increased by 1, and when the count reaches N, the y _ cnt starts to count again from 0. With SCLK as a timing sequence, an x _ cnt counter is designed, the counter starts counting from 0, and stops counting when counting to N. The partial counting process of two counts is shown in x _ cnt and y _ cnt of fig. 3. The two counters are mainly used to locate the matrix elements (image gray values), x _ cnt locates the abscissa, y _ cnt locates the ordinate, x of the matrix equals to the value of x _ cnt plus 1, y of the matrix equals to the value of y _ cnt plus 1, e.g. x _ cnt equals to 0, y _ cnt equals to 1 indicates the element of row 1 and column 2 of the matrix.
(3) Calculating (x-x)0)2-(y-y0)2First, x-x is calculated0,y-y0Then according to the formula (x-x)0)×(x-x0)-(y-y0)×(y-y0) The calculation result is delayed by 1 clock cycle, for example, x equals 1, y equals 3 (corresponding to the positions x _ cnt equals 0 and y _ cnt equals 2), and the calculation result is output at the position where x _ cnt equals 0 and y _ cnt equals 3 bits. The calculation results of all positions in the 1 st row of the matrix are output between the two dotted lines A and B.
(4) Computing
Figure BDA0002353145430000091
And (4) inputting the result calculated in the step (3) into an open IP core, and delaying for one clock cycle to output an operation result sqr _ q. And (4) integrating the calculation processes of (3) and (4), and delaying the clock by 2 clock cycles. If x equals 1, y equals 1 (corresponding to the positions x _ cnt equals 0 and y _ cnt equals 0), the result of the calculation is output at the position where x _ cnt equals 0 and y _ cnt equals 2. And the calculation results of all coordinates in the 1 st row of the matrix are output between the C and D dot-and-dash lines.
(5) According to the timing sequence of the clock Clk, a counter address is set, an enable signal for starting counting is consistent with the y _ cnt counter, and a partial timing diagram of the address counter is shown in FIG. 3. The function of the address counter is to read the image grey values from the ROM core. From the issuance of the address bit address, there is a delay of two clock cycles to the output data, and the image gradation value of 0, such as address, is read at a position where the address is equal to 2. Due to the relationship of the address counter and the y _ cnt counter, address, etc. 0 is positioned where x _ cnt equals 0, y _ cnt equals 0, and the output gray values are positioned where x _ cnt equals 0 and y _ cnt equals 2. The specific correspondence is shown in fig. 3.
(6) From FIG. 3, the formula can be seen
Figure BDA0002353145430000101
The result of the calculation and the gray value with coordinates (x, y) are two completely synchronous signals, and the two results can be directly multiplied to complete the formula
Figure BDA0002353145430000102
The calculation process of (2). The result is noted as vector sqr _ x1
(7) All the results (sqr _ x) from line 2 to line N can be calculated according to the above calculation process2~sqr_xN) The result of the addition of the results of the elements within all vectors is then the numerator of the MR.
4. And (4) dividing the result of the calculation in the step (7) in the step (3) by the sum of all the elements (image gray values) of the matrix to obtain the MR.
Calculating control voltage of the three deformable mirrors:
the calculation formula of the control voltage of the deformable mirror is u(n+1)=un-γΔunΔJ(n)In the formula, gamma delta unΔJ(n)For gradient estimation, γ is the gain factor, Δ unFor random perturbations, Δ J(n)Is the variation of the performance index
Figure BDA0002353145430000103
The performance indicator function MR is a forward minimumDirection finding the optimal solution, so when Δ unAnd Δ J(n)When the signs of the two signals are consistent, the gradient estimation result is subtracted, and when the sign of the two signals is consistent, the value of the gradient is increasednAnd Δ J(n)When the signs of (1) are opposite, the gradient estimation result is added. The invention realizes the calculation of the control voltage of the deformable mirror according to the formula (4).
u(n+1)=un-γΔunΔJ(n)(4)
In the formula: gamma is the gain factor taking a positive value. The calculation module of the control voltage is shown in fig. 4, and the specific implementation steps are as follows:
1. after positive disturbance is applied to the deformable mirror, image data are collected, a performance index function MR is calculated by using a performance index function calculation module and is recorded as MR1. After negative disturbance is applied to the deformable mirror, image data is collected, and a performance index function MR is calculated by using a performance index function calculation module2
2. Calculating the variation Δ MR of the performance indicator function as MR1-MR2
3. The gradient is calculated.
4. Calculating the control voltage according to formula (4), and converting the formula into u for realizing convenience(n+1)=un-Asign(Δun)ΔJ(n)Where A denotes the product of the gain factor and the random perturbation amplitude (positive value), sign (Δ u)n) Equal to plus or minus 1, and d in the timing diagram of the random perturbation in FIG. 1 represents the different timing sign (Δ u)n) The value of (c).
5. And after the control voltage is calculated, adding the (n + 1) th random disturbance voltage, and then outputting the control voltage to the deformable mirror to acquire image data. And subtracting the random disturbance voltage of the (n + 1) th time, then outputting the control voltage to the deformable mirror, and collecting the image data again.
FIG. 5 shows a timing diagram of the control voltage calculation process, where the MR _ Done signal is high, indicating that the performance indicator function module has completed its calculation, and after the MR _ Done signal is triggered, the next 1 rising edge of the clock Clk outputs MR1MR2Synchronously computing MR1And MR2The difference Δ MR of (a). SJU _ en enable signal is used for triggering random disturbance module and outputting random disturbance moduleThe inner d signal. In order to determine the position of the d signal output, a counter cnt of 0-98 is designed. It can be seen from fig. 5 that the signal d is output when cnt is equal to 3, and after the cnt counting is completed, the output is delayed by 1 clock cycle, and there are 97 d outputs in total. The preprocessing part completes the product A of the random disturbance amplitude and the gain coefficient. The T _ D signal (gradient) is the product of Δ MR, D, A. Synchronously finishing the calculation process of subtracting the gradient from the current voltage to obtain u(n+1)And storing. SJU _ en is also the trigger signal of the next random disturbance module, the random disturbance dv starts to be output at the position where cnt is equal to 3, after cnt counting is completed, the output is finished by delaying 1 clock cycle. Will control the voltage u(n+1)And adding random disturbance to the deformable mirror and subtracting the random disturbance to obtain the control voltage to be output by the iteration.
The FPGA-based wave-front-free detection adaptive optics SPGD control algorithm experiment system comprises:
the structural block diagram of the system is shown in fig. 6, the imaging device (such as cameras with various interfaces and image acquisition systems with COMS and CCD photosensitive chips) acquires light spot image data, and the acquired image data is transmitted and stored in the FPGA development board through data lines (such as USB and optical fibers). The SPGD control algorithm realized by FPGA processes the image data, calculates the control voltage of the wave-front corrector, and transmits the calculated control voltage to the wave-front corrector (such as deformable mirrors and spatial light modulators with various unit numbers) through data lines (depending on interfaces of the wave-front corrector for receiving data) such as USB or optical fibers, so as to achieve the purpose of controlling the wave-front corrector to correct the speckle image.

Claims (4)

1. A method for realizing a wavefront-free detection self-adaptive optical SPGD control algorithm based on an FPGA is characterized by comprising the following steps:
(1) the random disturbance module generates a plurality of groups of pseudo-random sequences, and each group of sequences is multiplied by disturbance voltage and added with corresponding signs in the FPGA to generate positive disturbance and negative disturbance;
(2) selecting the average Radius MR-Mean Radius of the far-field light spot as a performance index function,
Figure FDA0002353145420000011
wherein (x)0,y0) Is the centroid of the spot;
Figure FDA0002353145420000012
i (x, y) represents the pixel gray value at the corresponding coordinate (x, y); the ROI area of the spot is NXN, so x, y ∈ [1, N ∈];
(3) A voltage control module for calculating the deformable mirror according to a formula u(n+1)=u(n)-γΔu(n)ΔJ(n)And calculating control voltage, optimizing the performance index function MR in the direction of the minimum value, and taking a positive value for gamma.
2. The method of claim 1, wherein generating the plurality of sets of pseudo-random sequences is performed by Matlab software.
3. The method for realizing the FPGA-based wavefront-free detection adaptive optics SPGD control algorithm according to claim 1, wherein the number of disturbance paths for randomly disturbing the voltage is large and random; the requirement that the random disturbance voltage generates a plurality of groups of pseudo-random sequences by means of Matlab software is as follows:
a. the number of paths is equal to the number of deformable mirror units; n paths of pseudo-random sequences are needed for the deformable mirror with N units;
b. the pseudo-random sequences are mutually independent in pairs; the driving units are independent to each other, so that mutual coupling among the driving units of the deformable mirror can be avoided;
c. the pseudorandom sequence follows a bernoulli distribution with a probability of two sample values each of 0.5.
4. The method for realizing the FPGA-based wavefront-free detection adaptive optics SPGD control algorithm according to claim 1 or 2, characterized in that the method adopts the following steps to realize the SPGD control algorithm:
(1) generating a random number sequence by software and storing the random number sequence into a development board of the FPGA;
(2) FPGA reads the random sequence and generates a disturbance voltage { delta un},(j=1,...,N,|Δu(n)|=0.2,sgn(Δu(n))=±1);
(3) FPGA (field programmable Gate array) applies positive disturbance u to deformable mirror(n)+Δu(n),u(n)The control voltage is calculated in the (n-1) th iteration, image data is collected, and a performance index function is calculated
Figure FDA0002353145420000021
(4) FPGA (field programmable Gate array) applies negative disturbance u to deformable mirror(n)-Δu(n)Acquiring image data, calculating performance index function
Figure FDA0002353145420000022
(5) Calculating the variation of the performance index function in the steps (3) and (4)
Figure FDA0002353145420000023
Calculating the gradient gamma delta u according to the variation(n)ΔJ(n)According to the formula u(n+1)=u(n)-γΔu(n)ΔJ(n)Completing the calculation of the control voltage of the deformable mirror;
and (5) repeating the steps (3) to (5) for a plurality of iterations until the optimal control voltage of the deformable mirror is found, so that the sum of the initial aberration (psi (r)) and the correction phase (m (r)) of the deformable mirror approaches to 0.
CN201911424233.3A 2019-12-31 2019-12-31 Method for realizing self-adaptive optical SPGD control algorithm based on FPGA Active CN111103686B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911424233.3A CN111103686B (en) 2019-12-31 2019-12-31 Method for realizing self-adaptive optical SPGD control algorithm based on FPGA

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911424233.3A CN111103686B (en) 2019-12-31 2019-12-31 Method for realizing self-adaptive optical SPGD control algorithm based on FPGA

Publications (2)

Publication Number Publication Date
CN111103686A true CN111103686A (en) 2020-05-05
CN111103686B CN111103686B (en) 2022-05-03

Family

ID=70426635

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911424233.3A Active CN111103686B (en) 2019-12-31 2019-12-31 Method for realizing self-adaptive optical SPGD control algorithm based on FPGA

Country Status (1)

Country Link
CN (1) CN111103686B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112255780A (en) * 2020-11-03 2021-01-22 吉林大学 Coherent FSOC system based on SPGD algorithm
CN112286107A (en) * 2020-11-03 2021-01-29 上海奕太智能科技有限公司 FPGA-based adaptive optical closed-loop control system and control method
CN113359871A (en) * 2021-06-29 2021-09-07 中国科学院光电技术研究所 Fixed-point closed-loop method based on double-prism rotating device
CN114721145A (en) * 2022-01-20 2022-07-08 苏州科技大学 Method for improving horizontal laser communication SPGD algorithm correction precision

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101266334A (en) * 2008-05-07 2008-09-17 北京理工大学 Wavefront-free detector self-adapting optical system based on random paralleling gradient descent algorithm

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101266334A (en) * 2008-05-07 2008-09-17 北京理工大学 Wavefront-free detector self-adapting optical system based on random paralleling gradient descent algorithm

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张金宝: "基于FPGA的伪随机序列的生成方法及应用", 《微计算机信息》 *
张金宝: "自适应光学系统SPGD控制算法的FPGA硬件实现", 《光电工程》 *
王彩霞: "基于随机并行梯度下降算法的自适应光学实时并行处理机", 《光学学报》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112255780A (en) * 2020-11-03 2021-01-22 吉林大学 Coherent FSOC system based on SPGD algorithm
CN112286107A (en) * 2020-11-03 2021-01-29 上海奕太智能科技有限公司 FPGA-based adaptive optical closed-loop control system and control method
CN113359871A (en) * 2021-06-29 2021-09-07 中国科学院光电技术研究所 Fixed-point closed-loop method based on double-prism rotating device
CN113359871B (en) * 2021-06-29 2022-08-23 中国科学院光电技术研究所 Fixed-point closed-loop method based on double-prism rotating device
CN114721145A (en) * 2022-01-20 2022-07-08 苏州科技大学 Method for improving horizontal laser communication SPGD algorithm correction precision
CN114721145B (en) * 2022-01-20 2023-10-24 苏州科技大学 Method for improving correction precision of SPGD algorithm for horizontal laser communication

Also Published As

Publication number Publication date
CN111103686B (en) 2022-05-03

Similar Documents

Publication Publication Date Title
CN111103686B (en) Method for realizing self-adaptive optical SPGD control algorithm based on FPGA
Miao et al. A parallel stochastic computing system with improved accuracy
Stumpp et al. Harms: A hardware acceleration architecture for real-time event-based optical flow
CN108762719B (en) Parallel generalized inner product reconstruction controller
CN111079893A (en) Method and device for obtaining generator network for interference fringe pattern filtering
CN110335219B (en) Correction method and correction device for pixel distortion and terminal
CN116824047A (en) Structured light three-dimensional reconstruction method based on stripe image enhancement
CN115618176A (en) Moire fringe signal error compensation method and system based on improved particle swarm optimization and storage medium
Schlessman et al. Tailoring design for embedded computer vision applications
Claus et al. High performance FPGA based optical flow calculation using the census transformation
CN109558567B (en) Upper triangular part storage device of self-conjugate matrix and parallel reading method
CN113778379A (en) CORDIC-based low-complexity hardware system and application method
Mauch et al. Real-Time Adaptive Optic System Using FPGAs
Häublein et al. Fast and generic hardware architecture for stereo block matching applications on embedded systems
CN114119661A (en) Target tracking processor, target tracking method and device
CN109614582B (en) Lower triangular part storage device of self-conjugate matrix and parallel reading method
CN101980145B (en) No-carry adder of ternary optical computer
Tahara et al. FPGA-based real-time object tracking using a particle filter with stream architecture
RU2303813C1 (en) Device for recognizing objects
SU1656511A1 (en) Digital function separator
CN109857982B (en) Triangular part storage device of symmetric matrix and parallel reading method
Lucas et al. Fast W-Projection for Wide-field Imaging
US20220374201A1 (en) Digital Signal Processing Device
Ranganathan et al. A VLSI chip for computing the medial axis transform of an image
Kong et al. FPGA Implementation of Shack–Hartmann Wavefront Sensing Using Stream-Based Center of Gravity Method for Centroid Estimation. Electronics 2023, 12, 1714

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant