Full-focusing imaging method and system based on FPGA (Field Programmable Gate Array)
By performing flight distance calculation inside the FPGA and using the CORDIC algorithm, efficient full-focus imaging is achieved, solving the problems of low parallelism and low efficiency on the FPGA platform in the prior art, and real-time imaging effect with high frame rate is achieved.
Patent Information
- Application Number
- CN202411051818.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-07-31
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-29
AI Technical Summary
When the existing full-focus imaging algorithm is implemented on the FPGA platform, it lacks high parallelism and efficiency, resulting in poor real-time imaging effects, especially when the number of array elements and pixel points increase, the frame rate is severely reduced, and data transmission and software computing consume time. Longer.
A fully focused imaging system based on FPGA is designed, and the full focus imaging algorithm is realized by performing flight distance calculations within the FPGA, using CORDIC algorithm and pipeline parallel form to reduce data transmission and software interaction, and directly performing data processing and image generation within the FPGA.
Real-time imaging with high frame rate is realized, imaging delay and computing cost is reduced, and the parallel characteristics of FPGA are fully utilized, which is suitable for a variety of application scenarios.
Smart Images

Figure CN119044335A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial non-destructive flaw detection, and in particular to a FPGA-based full-focus imaging method and system. Background Art
[0002] Nowadays, with the development of science and technology, ultrasonic phased array detection has made significant progress and is now widely mentioned and applied in the field of non-destructive testing. The full-focus imaging algorithm is one of the advanced algorithms among many phased array imaging algorithms. For a long time since the full-focus imaging algorithm was proposed, it could only be implemented offline due to a large amount of data collection and computing requirements. Real-time monitoring is an important indicator of non-destructive testing. Therefore, the pursuit of improving the computing efficiency of full-focus imaging has always been the direction of people's efforts.
[0003] Among the existing full-focus algorithms, there are platforms with parallel computing characteristics such as GPU and FPGA to implement the full-focus algorithm, but the GPU is limited by the bottleneck of the original data transmission speed and the inherent serial execution nature, so its real-time imaging can only be achieved under low configuration. When the number of array elements or the number of imaging pixels increases, the frame rate will drop seriously. There are also designs that use FPGA to achieve full-focus imaging, but they do not fully utilize the parallel computing of FPGA, resulting in low efficiency, and usually the flight time is calculated by software and then obtained by FPGA from external memory, which consumes a lot of time and limits bandwidth.
[0004] Nowadays, there are still many full-focusing imaging algorithms that use the full-matrix data collected by the ultrasonic phased array, and then use the relevant full-focusing algorithm to process the data on the host computer. Even if a better imaging algorithm is used to compress the imaging time, the overall imaging speed is not greatly improved because the data transmission itself takes a long time.
[0005] For example, the invention patent with application number 202410011837.X involves an ultrasonic full-focus wavenumber domain imaging method, system and device based on FPGA and GPU, which uses the wavenumber domain method to realize phased array ultrasonic full-focus imaging and plane wave full-focus imaging. By performing fast Fourier transform on the full matrix acquisition echo data and intercepting it within the bandwidth range, the transmission pressure of FMC data of the multi-channel ultrasonic detection system is greatly reduced, and the different operation links in the wavenumber domain imaging method are reasonably allocated to different hardware computing resources, so that high-resolution full-focus image output with high frame rate can be achieved with less hardware cost. However, since the imaging is realized by GPU, the GPU is still limited by the bottleneck of FMC transmission data. The FMC data collected after each transmission channel switching will be transmitted to the GPU through FPGA for imaging. This design will realize full-focus imaging inside the FPGA. From the beginning of imaging to the completion of an imaging result output, the FPGA and the host computer only need to interact with pixel data once. Summary of the invention
[0006] In view of the technical problems in the prior art of low parallelism and poor imaging effect in realizing full-focus imaging inside FPGA, the present invention proposes a full-focus imaging method and system based on FPGA, which speeds up the imaging rate, can realize high frame rate real-time imaging, and is suitable for a variety of application scenarios.
[0007] In order to achieve the above-mentioned purpose, the technical scheme of the present invention is implemented as follows: an FPGA-based full-focus imaging system comprises a phased array system, an FPGA module, an FX3 module and a host computer connected in sequence, the FPGA module comprises a global signal control module, a data collection module, an SPI sending module, a clock module, a flight distance calculation module, a data index module, a full-focus operation module, an imaging data output module, a register configuration module and a UART receiving module, the global signal control module, the data collection module and the SPI sending module are all connected to the phased array system, the data index module and the full-focus operation module are all connected to the data collection module, the flight distance calculation module and the data index module are connected, the FX3 module and the full-focus operation module are all connected to the imaging data output module, the FX3 module and the register configuration module are all connected to the UART receiving module, and the global signal control module, the data collection module, the SPI sending module, the flight distance calculation module, the data index module, the full-focus operation module, the imaging data output module, the register configuration module and the UART receiving module are all connected to the clock module.
[0008] The phased array system comprises at least one array element, and both the data collection module and the SPI sending module are connected to the array element.
[0009] The imaging method based on the FPGA full-focus imaging system comprises the following steps:
[0010] S1: The host computer controls the internal UART sending module of the FX3 module to send instructions to the UART receiving module of the FPGA module to configure the relevant registers in the register configuration module;
[0011] S2: Divide the imaging area into grids, each grid represents a pixel;
[0012] S3: After completing the register configuration, the host computer sends a full focus signal, and the global signal control module that receives the full focus signal sends a control signal to the phased array system, using an array element in the phased array system to send an acoustic wave signal to a pixel point and collect the reflected acoustic wave signal;
[0013] S4: transmitting the collected reflected acoustic wave signals to the FPGA module, and performing imaging operations on the acoustic wave signals to obtain a preliminary focused image;
[0014] S5: Repeat steps S3-S4 using the next array element of the phased array system, and use the full focusing algorithm to superimpose the obtained preliminary focused images until all array elements have sent an acoustic wave once, completing a full focusing imaging;
[0015] S6: Transmit the full-focus imaging data to the host computer and perform second frame imaging.
[0016] The method of using the phased array system to send the acoustic wave signal and collect the reflected acoustic wave signal in step S2 is:
[0017] When the phased array system receives the control signal, the phased array system uses one array element to transmit an acoustic wave signal to a pixel point in the imaging area. Subsequently, the phased array system uses all array elements to collect the reflected acoustic wave signals. After the collection is completed, the phased array system uses the array element to transmit an acoustic wave signal to the next pixel point in the imaging area, and repeats the above cycle steps until all the array elements complete the transmission of acoustic wave signals to all pixels.
[0018] The method for performing imaging operation on the acoustic wave signal in step S4 is:
[0019] S41: using the FPGA module, based on the detection area and the sound wave propagation speed, the echo signal received by each array element is stored in the corresponding block random access memory in the data collection module;
[0020] S42: After completing one cycle step, the flight distance calculation module is used to iteratively calculate to obtain the transmission distance of the sound wave sent by the transmitting array element and then received by the receiving array element after the sound wave reaches the focusing range;
[0021] S43: After completing all cycle steps, a preliminary focused image is obtained.
[0022] The formula for storing the echo signals received by each array element in the corresponding block random access memory in the data collection module according to the detection area and the sound wave propagation speed in step S41 is:
[0023] Storage depth = sampling frequency * (the distance from the transmitting array element to the pixel point + the maximum value of the distance from the receiving array element to the pixel point) / sound wave propagation speed.
[0024] The method of iterative calculation using the flight distance calculation module in step S42 is:
[0025] In a cycle step, after collecting a certain number of echo signals, the flight distance calculation module uses the CORIDC algorithm to iteratively calculate the focused pixels to obtain the distance from a pixel to each array element. The distance from a pixel to each array element is added to obtain the added flight distance, which is the sound wave transmission distance from the sending array element to the receiving array element after the sound wave arrives within the focusing range.
[0026] The method of obtaining the preliminary focused image in step S43 is:
[0027] After completing all cycle steps, the acoustic wave transmission distances obtained in all cycle steps are accumulated once in the full focusing operation module to obtain a preliminary focusing image.
[0028] The all-focusing algorithm in step S5 is:
[0029] The focusing process can be expressed as:
[0030]
[0031] Among them, P(x,z) is the coordinate of the pixel in the pixel network, T ip and T jp They are the flight time between the array element that sends the ultrasound and the array element that receives the echo and the pixel point P. The reconstruction of each pixel point P is the reconstruction of N 2 This is achieved by accumulating the basic signals of the selected samples.
[0032] The method of transmitting the all-focus imaging data to the host computer in step S6 is:
[0033] The fully focused imaging data is transmitted to the host computer through the imaging data output module via the USB protocol using the FX3 module as a bridge. The host computer sends a second frame data request based on the received image. The FPGA repeats S1-S6 internally until the second frame imaging is completed.
[0034] The beneficial effects of the present invention are as follows: the present invention provides a method and system for full-focus imaging based on FPGA, performs flight distance calculation inside FPGA, avoids the time consumption of FPGA reading flight distance from external memory, adopts CORDIC algorithm to facilitate the calculation of flight distance inside FPGA, can effectively reduce the calculation cost, improve calculation efficiency, the full-matrix acquisition echo data collected by FPGA is directly used in the FPGA through pipeline parallel form to realize full-focus imaging algorithm, avoids the data interaction between full-matrix acquisition echo data and host computer, only needs to transmit imaging data to host computer for image generation after full-focus imaging is completed, greatly reduces imaging delay. Real-time data processing, full use of parallel characteristics, accelerated imaging rate, can achieve high frame rate real-time imaging, and can be applied to a variety of application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 It is a system architecture diagram of the present invention.
[0037] Figure 2 Capture the working principle diagram for the full matrix.
[0038] Figure 3 A conceptual view of the all-focus imaging algorithm.
[0039] FIG4 (a) is a rotation mode diagram of the CORDIC algorithm; FIG4 (b) is a pseudo-rotation diagram of the CORDIC algorithm.
[0040] Figure 5 Implement the Mth focusing operation graph for the full focusing operation module. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] like Figure 1As shown, an FPGA-based full-focus imaging system includes a phased array system, an FPGA module, an FX3 module and a host computer connected in sequence, the FPGA module includes a global signal control module, a data collection module, an SPI sending module, a clock module, a flight distance calculation module, a data index module, a full-focus operation module, an imaging data output module, a register configuration module and a UART receiving module, the global signal control module, the data collection module, and the SPI sending module are all connected to the phased array system, the data index module and the full-focus operation module are all connected to the data collection module, the flight distance calculation module and the data index module are connected, the FX3 module and the full-focus operation module are all connected to the imaging data output module, the FX3 module and the register configuration module are all connected to the UART receiving module, and the global signal control module, the data collection module, the SPI sending module, the flight distance calculation module, the data index module, the full-focus operation module, the imaging data output module, the register configuration module and the UART receiving module are all connected to the clock module.
[0043] Among them, the clock module provides the working clock for all other modules, the UART receiving module receives the data transmitted from the host computer through the FX3 module, and then configures the register through the register configuration module. The register configuration module assigns values to the internal registers of other modules, the SPI sending module transmits the configuration information to the phased array system through the SPI bus, the global signal control module sends the control signal to the phased array system, and there are also the flight distance calculation module, data index module, data collection module, full focus calculation module, and imaging data output module connected in sequence. The phased array system is mainly used to send sound waves to the detection area and receive the reflected sound wave signal. The phased array system includes at least one array element, which is mainly used to send and receive sound waves. The full focus imaging system images the objects within the focus range, and the focus range is discretized into a pixel network. The pixel network is composed of pixel points, and each pixel point corresponds to an array element. The FPGA module is mainly used for imaging operations; the FX3 module is mainly used to connect the host computer and the FPGA module. The USB communication of the FX3 module can realize the interaction between the FPGA module and the host computer. The internal registers of the FPGA module can be configured, and the full focus start time can be set. In this way, the pulse delay, frequency, and number of cycles inside the phased array system can be controlled. The pixel matrix composed of the full focus results output by the imaging data output module of the FPGA module can also be received to form an imaging effect diagram on the host computer.
[0044] The host computer is mainly used to perform initial configuration and imaging of FPGA-related registers. The global signal control module is mainly used to provide control signals to the phased array system, the data collection module is mainly used to receive the acoustic wave signals collected from the phased array system, and the SPI transmission module is mainly used to transmit configuration information through the SPI bus to configure the registers in the phased array system. The clock module is mainly used to provide working clocks for all modules inside the FPGA. The flight distance calculation module is mainly used to calculate the distance from the array element to the pixel point in the imaging area. The data index module is mainly used to convert the flight distance obtained by the flight distance calculation module into an index address that can find the corresponding data from the data collection module. The full focus calculation module is mainly used to perform focusing operations on the pixel points in the imaging area. The imaging data output module is mainly used to transfer the image data that has completed focusing to the FX3 module through the USB protocol. The register configuration module is mainly used to assign values to the internal registers of other modules. The UART receiving module is mainly used to receive data transmitted from the host computer through the FX3 module.
[0045] Specifically, the process of full-focus imaging is as follows: First, the host computer sends instructions to the UART receiving module of the FPGA module through the internal UART sending module of the control FX3 module to configure the relevant registers in the register configuration module. After completing the register configuration, when the host computer sends a full-focus start signal, the global signal control module sends a control signal to the phased array system. At this time, the phased array system will select an array element to emit a sound wave. The emitted sound wave will be reflected back when it encounters a defect during the detection process, and the defect in the focus area will form a reflection wave with a large amplitude. All array elements in the phased array system are used to receive the echo signal, and then transmit it to the data collection module of the FPGA module.
[0046] The FPGA module will store the echo signals received by each array element in the corresponding block random access memory in the data collection module. The storage depth will be related to the detection area and the sound wave propagation speed. Specifically, the storage depth = sampling frequency * (the distance from the transmitting array element to the pixel point + the maximum value of the distance from the receiving array element to the pixel point) / sound wave propagation speed. This method can reduce the acquisition time, speed up the imaging speed, and reduce power consumption. Subsequently, the flight distance calculation module starts to calculate after collecting a certain number of echo signals, and uses the CORIDC algorithm for the focused pixel points. After 16 iterations, the distance from each array element to the pixel point can be obtained. The design is in the form of a pipeline, so the distance from a pixel point to each array element can be obtained in each subsequent cycle. The calculated flight distances are added, and the distances from other array elements to the pixel points are added to the distance from the transmitting array element to the pixel point. The added flight distance is the sound wave transmission distance received by the receiving array element after the transmitting array element sends the sound wave and then reaches the focusing range. If the defect is within this fully focused imaging range, there will be an obvious waveform.
[0047] The added flight distance is processed by the data index module to obtain the index address storing the array element echo signal. Subsequently, the corresponding echo signal is read out through the index address, and accumulated once in the full focusing operation module to obtain a preliminary focused image. The accumulated data of one pixel of this data will be saved for subsequent focusing. When all pixel points are calculated, the global signal control module will continue to send a control signal to control the second array element to send sound waves, and then repeat the above process until all array elements have sent a sound wave. It should be noted that each focused image obtained in the subsequent full focusing operation module must be superimposed with the previous focused image and saved.
[0048] When the last array element sends a signal and performs the final full focusing of the echo signal in the full focusing operation module, full focusing imaging is completed. At this time, the imaging data can be transmitted to the host computer through the USB protocol using the FX3 module as a bridge through the imaging data output module, and a frame of image transmission is completed. The host computer can send a second frame of data request based on the received image, and then the above full focusing process is repeated inside the FPGA, thereby achieving the purpose of real-time imaging.
[0049] Figure 2 This is the working principle diagram of full matrix capture. During this process, the transmission and reception of ultrasound is carried out in the order of array element arrangement. In the first transmission process, the ultrasound is emitted by the first array element in the array, and all array elements in the array will receive the corresponding echo. Next, the second array element is switched to emit ultrasound, and all array elements in the array will receive the corresponding echo. Repeat the above process until all array elements in the array have transmitted ultrasound once. If there are N array elements in the array, full matrix capture will generate a set of N 2 A collection of basic signals. Let S ij (t) is the echo signal received by array element j at time t when array element i sends ultrasound. The N×N array generated by full matrix capture contains all the acoustic wave data information related to the transmitting array element and the receiving array element, which can be used for many traditional post-reconstruction techniques and can also be used to achieve full-focus imaging.
[0050] Figure 3 This is a conceptual view of the full-focus imaging algorithm. The full-focus imaging algorithm mainly processes the data captured by the full matrix. This algorithm uses the phased array elements to acoustically focus each point in the area below the sensor. It discretizes the focus range into a pixel network and then calculates the distance between the array element and the pixel. The focusing process can be expressed by the formula:
[0051]
[0052] Where P(x,z) is the coordinate of the pixel in the pixel network, T ip and T jp They are the flight time between the array element that sends the ultrasound and the array element that receives the echo and the pixel point P. The reconstruction of each pixel point P is the reconstruction of N 2 This is achieved by accumulating the basic signals of the selected samples.
[0053] FIG4 (a) is a rotation mode diagram of the CORDIC (Coordinate Rotation Digital Computation Method) algorithm. The CORDIC algorithm can be used to calculate linear functions and hyperbolic functions (square root extraction). The CORDIC algorithm consists of only shift operations and addition and subtraction operations, which occupies less FPGA resources and can effectively reduce the computational cost and improve the computational efficiency. Therefore, the CORDIC algorithm is suitable for calculating the flight distance within the FPGA. The computation can be completed by only knowing the difference between the horizontal and vertical coordinates of the array element and the pixel point, which reduces the computational cost and improves the computational efficiency.
[0054] Specifically, regarding the CORDIC algorithm, FIG4(a) is a unit circle, on which two points P and Q are randomly selected, where the coordinates of point P (X P ,Y P ), Q point coordinates (X Q ,Y Q ), the coordinates of point P can be expressed by trigonometric functions as follows:
[0055] X P =cosα,Y P = sinα (2)
[0056] Where α is the angle between vector P and the X-axis.
[0057] The coordinates of point Q can be expressed as:
[0058] Y Q =sin(α+θ)=sinαcosθ+sinθcosα, Y Q =sin(α+θ)=sinαcosθ+sinθcosα (3)
[0059] Substituting (2) into (3) we can obtain:
[0060] X Q = cosθ(X P -Y P tanθ), Y Q =cosθ(Y P +X P tanθ) (4)
[0061] Wherein, θ is the angle between vector P and vector Q.
[0062] Figure 4(b) is a pseudo-rotation diagram of the CORDIC algorithm. Pseudo-rotation is the core concept of the algorithm. When OP in the figure is rotated and coincides with OQ, according to the trigonometric function relationship, it can be obtained that the length of OQ is cosθ times that of OR, and the phase is the same, so the coordinates of point R can be obtained as:
[0063] X R =X P -Y P tanθ,Y R =Y P +X P tanθ (5)
[0064] The result of pseudo-rotation of OP is called OR. The modulus value will be compensated later. The complete process is to calculate the pseudo-rotation first and then compensate the modulus value. The calculation of pseudo-rotation is the core of the algorithm. First, θ is decomposed into multiple iterations of θ i The values are added, and the coordinates after multiple iterations will be represented as:
[0065] X i+1 =X i -Y i tanθ i , Y i+1 =Y i +X i tanθ i (6)
[0066] Since tanθ i It is not easy to find, so replace it, make the rotation angle fixed each time, and perform multiple iterations to minimize the error. After replacement, tanθ i for:
[0067] tanθ i =d i 2 -i (7)
[0068] The process of rotation iteration can be regarded as OP rotating and oscillating around OQ until it almost coincides with OQ. This will of course involve the phase exceeding OQ or falling below OQ from time to time. If it exceeds OQ, it will rotate clockwise next time, and if it falls below OQ, it will rotate counterclockwise. Therefore, it is necessary to record the distance and phase from the target after this rotation. This introduces a new variable Z to record:
[0069] Z i+1 =Z i -θ i =Z i -tan -1 (d i 2 -i ) (8)
[0070] In both equations (7) and (8), d i Is the direction of rotation, if Z i It is a negative number, which means the phase is lagging behind. To increase the phase, we take the negative and then double the negative to get the positive, so Z i+1 becomes larger. On the contrary, if Z i If it is a positive number, it means that the phase is ahead and needs to be brought back a little, so we take a negative value to make Z i+1 Equal to Z i Subtract the current micro-rotation angle θ i .
[0071]
[0072] After 16 iterations, phase compensation is required. Since the number of iterations is fixed and the angle of each rotation is fixed, the final compensation value can be calculated in advance and combined with formula (6) to obtain the final iteration result.
[0073] The CORDIC algorithm is used to calculate the modulus value by simply positioning the Q coordinate to the positive half of the X-axis, and then the final P can be rotated to the positive half of the X-axis, thereby obtaining the rotated X value, which is the final calculated modulus value.
[0074] As you can see, the specific method of using the CORIDC algorithm for the focused pixel is:
[0075] According to the CORDIC algorithm, the horizontal coordinate difference X and the vertical coordinate difference Y between the array element and the pixel are obtained. Then, after N iterations, the distance between the array element and the pixel can be obtained, that is, X 2 +Y 2 The square root of , the CORDIC algorithm has two modes. In the rotation mode, after N iterations, the final result can be expressed as:
[0076]
[0077] Where x0, y0, z0 correspond to the horizontal and vertical coordinates of the vector (X, Y) inside the unit circle and the corresponding angle, respectively. n ,y n is the output result after pseudo rotation, K is the modulus compensation, and the final result after N iterations in vector mode can be expressed as:
[0078]
[0079] In summary, CORDIC can perform square root calculations, which is the algorithm used by the flight distance calculation module.
[0080] Figure 5This is an example diagram of the full focusing operation module implementing the Mth focusing operation. Taking the Mth array element transmission as an example, it illustrates how FPGA parallel focusing operation is implemented.
[0081] Specifically, the flight distances of all array elements and the pixel point P to be focused are first obtained through the CORDIC algorithm, and then the flight time of different receiving array elements relative to the focused pixel point is obtained according to the propagation speed in the data index module and converted into an index address.
[0082] According to the index address, the corresponding data is obtained from the random access memory of the N data collection modules storing the echo data in the data collection module, the obtained data are accumulated in groups of two, and then the accumulated data are input into the accumulation module. The internal pipeline is adopted to ensure that a pixel focusing result can be obtained in each cycle.
[0083] Then, the focusing result of the P pixel point is added to the focusing results of the P pixel point for the previous M-1 times to obtain the Mth focusing result of the P pixel point, which is then stored in the pixel matrix of the corresponding pixel point.
[0084] At this point, the focusing operation of one pixel is completed. Because it is a pipeline design, when focusing on P pixels, the accumulation module has completed the accumulation of P+1 pixels, and the focusing of P+1 pixels can be completed in the next cycle, so that the focusing of one pixel can be completed in each cycle.
[0085] The present invention provides a method and system for full-focus imaging based on FPGA. The beneficial effects of the present invention are as follows: the flight distance is calculated inside the FPGA, which avoids the time consumption of the FPGA module reading the flight distance from an external memory, and the full-focus imaging algorithm is completed in the FPGA in a pipeline parallel form, so that data is processed in real time, the parallel characteristics are fully utilized, the imaging rate is accelerated, and high frame rate real-time imaging can be achieved, which is suitable for a variety of application scenarios.
[0086] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A FPGA-based full-focus imaging system, characterized in that: The invention comprises a phased array system, an FPGA module, an FX3 module and a host computer which are connected in sequence. The FPGA module comprises a global signal control module, a data collection module, an SPI sending module, a clock module, a flight distance calculation module, a data index module, a full focusing operation module, an imaging data output module, a register configuration module and a UART receiving module. The global signal control module, the data collection module and the SPI sending module are all connected to the phased array system. The data index module and the full focusing operation module are all connected to the data collection module. The flight distance calculation module and the data index module are all connected. The FX3 module and the full focusing operation module are all connected to the imaging data output module. The FX3 module and the register configuration module are all connected to the UART receiving module. The global signal control module, the data collection module, the SPI sending module, the flight distance calculation module, the data index module, the full focusing operation module, the imaging data output module, the register configuration module and the UART receiving module are all connected to the clock module.
2. The FPGA-based all-focusing imaging system according to claim 1, characterized in that: The phased array system comprises at least one array element, and both the data collection module and the SPI sending module are connected to the array element.
3. The imaging method based on the FPGA all-focusing imaging system according to claim 2, characterized in that the steps include: S1: The host computer controls the internal UART sending module of the FX3 module to send instructions to the UART receiving module of the FPGA module to configure the relevant registers in the register configuration module; S2: Divide the imaging area into grids, each grid represents a pixel; S3: After completing the register configuration, the host computer sends a full focus signal, and the global signal control module that receives the full focus signal sends a control signal to the phased array system, using an array element in the phased array system to send an acoustic wave signal to a pixel point and collect the reflected acoustic wave signal; S4: transmitting the collected reflected acoustic wave signals to the FPGA module, and performing imaging operations on the acoustic wave signals to obtain a preliminary focused image; S5: Repeat steps S3-S4 using the next array element of the phased array system, and use the full focusing algorithm to superimpose the obtained preliminary focused images until all array elements have sent an acoustic wave once, completing a full focusing imaging; S6: Transmit the full-focus imaging data to the host computer and perform second frame imaging.
4. The imaging method based on the FPGA all-focusing imaging system according to claim 3, characterized in that: The method of using the phased array system to send the acoustic wave signal and collect the reflected acoustic wave signal in step S2 is: When the phased array system receives the control signal, the phased array system uses one array element to transmit an acoustic wave signal to a pixel point in the imaging area. Subsequently, the phased array system uses all array elements to collect the reflected acoustic wave signals. After the collection is completed, the phased array system uses the array element to transmit an acoustic wave signal to the next pixel point in the imaging area, and repeats the above cycle steps until all the array elements complete the transmission of acoustic wave signals to all pixels.
5. The imaging method based on the FPGA all-focusing imaging system according to claim 3 or 4, characterized in that: step The method for performing imaging operation on the acoustic wave signal described in S4 is: S41: using the FPGA module, based on the detection area and the sound wave propagation speed, the echo signal received by each array element is stored in the corresponding block random access memory in the data collection module; S42: After completing one cycle step, the flight distance calculation module is used to iteratively calculate to obtain the transmission distance of the sound wave sent by the transmitting array element and then received by the receiving array element after the sound wave reaches the focusing range; S43: After completing all cycle steps, a preliminary focused image is obtained.
6. The imaging method based on FPGA all-focusing imaging system according to claim 5, characterized in that: The formula for storing the echo signals received by each array element in the corresponding block random access memory in the data collection module according to the detection area and the sound wave propagation speed in step S41 is: Storage depth = sampling frequency * (the distance from the transmitting array element to the pixel point + the maximum value of the distance from the receiving array element to the pixel point) / sound wave propagation speed.
7. The imaging method based on FPGA all-focusing imaging system according to claim 6, characterized in that: The method of iterative calculation using the flight distance calculation module in step S42 is: In a cycle step, after collecting a certain number of echo signals, the flight distance calculation module uses the CORIDC algorithm to iteratively calculate the focused pixels to obtain the distance from a pixel to each array element. The distance from a pixel to each array element is added to obtain the added flight distance, which is the sound wave transmission distance from the sending array element to the receiving array element after the sound wave arrives within the focusing range.
8. The imaging method based on FPGA all-focusing imaging system according to claim 7, characterized in that: The method of obtaining the preliminary focused image in step S43 is: After completing all cycle steps, the acoustic wave transmission distances obtained in all cycle steps are accumulated once in the full focusing operation module to obtain a preliminary focusing image.
9. The imaging method based on FPGA all-focusing imaging system according to claim 8, characterized in that: The all-focusing algorithm in step S5 is: The focusing process can be expressed as: Among them, P(x,z) is the coordinate of the pixel in the pixel network, T ip and T jp They are the flight time between the array element that sends the ultrasound and the array element that receives the echo and the pixel point P. The reconstruction of each pixel point P is the reconstruction of N 2 This is achieved by accumulating the basic signals of the selected samples.
10. The imaging method based on FPGA all-focusing imaging system according to claim 8 or 9, characterized in that: The method of transmitting the all-focus imaging data to the host computer in step S6 is: The fully focused imaging data is transmitted to the host computer through the imaging data output module via the USB protocol using the FX3 module as a bridge. The host computer sends a second frame data request based on the received image. The FPGA repeats S1-S6 internally until the second frame imaging is completed.
Citation Information
Cited By
Hardware acceleration deployment method of ultrasonic full-focus algorithm on FPGA (Field Programmable Gate Array) platform
CN121526870A
