Real-time processing method of spaceborne SAR imaging based on multi-server and multi-GPU

Through the real-time processing method of spaceborne SAR imaging with multiple servers and multiple GPUs, the problem of time delay and large computational load of spaceborne synthetic aperture radar SAR imaging in traditional technology is solved, efficient radar echo signal processing is achieved, and simulation consumption is significantly reduced. time and improved responsiveness.

CN113885028BActive Publication Date: 2024-08-30XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111096539.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-18
Publication Date
2024-08-30
Estimated Expiration
2041-09-18

AI Technical Summary

Technical Problem

Traditional spaceborne synthetic aperture radar SAR has problems such as long time delay and slow response speed during the imaging process, which makes it difficult to meet the rapid response requirements for major event detection. In addition, the back projection imaging BP algorithm requires a large amount of calculation and is difficult to apply to data. Large scale and high real-time requirements.

Method used

A real-time processing method for spaceborne SAR imaging based on multi-server and multi-GPU is adopted. Through the secret-free transmission between multi-CPU host terminals and the parallel computing structure of multi-GPU device terminals, high parallel processing of radar back-projection imaging BP data is achieved, with a maximum Optimize the use of GPU device-side space to accelerate the processing of radar echo signal data.

Benefits of technology

It effectively avoids the problem of insufficient memory space, reduces simulation time, improves the utilization of memory resources on the GPU device side, hides the memory access delay on the GPU device side, and runs calculation processes without data dependence in parallel, significantly reducing the running time. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113885028B
    Figure CN113885028B
Patent Text Reader

Abstract

The invention discloses a real-time processing method for satellite-borne SAR imaging based on multiple servers and multiple GPUs. The method comprises the following steps: firstly, satellite-borne SAR radar echo data is read on any CPU host end, and radar echo signal data is divided into multiple CPU host ends by utilizing the non-confidential communication between multiple CPU host ends; then, corresponding radar echo signal data parameters and multiple GPU device end information are read on each CPU host end, and the number of threads of the CPU host end is set; then, each GPU device end reads the satellite-borne SAR radar echo data divided for it in azimuth, allocated memory, and complex echoes of radar echo signals from its corresponding CPU host end; finally, range pulse compression of complex echoes is realized on the GPU device end, and BP imaging is realized; after the BP imaging on all GPU device ends is acquired, a radar echo data processing file is written, and the imaging result is analyzed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of radar signal processing, and in particular relates to a real-time processing method for high-resolution imaging of spaceborne synthetic aperture radar SAR (Synthetic Aperture Radar, SAR) based on multiple servers and multiple GPUs. Background Art

[0002] Spaceborne synthetic aperture radar (SAR) has broad application prospects in natural disaster monitoring and forecasting due to its high working orbit and wide geographical coverage. Traditional spaceborne synthetic aperture radar (SAR) needs to go through multiple links such as on-board storage, satellite-to-ground data transmission, and ground reception and processing during the imaging process. It has problems such as long time delay and slow response speed, and it is difficult to meet the requirements of rapid response capability of satellite systems when detecting major events. Therefore, shortening the imaging time of spaceborne synthetic aperture radar (SAR) can improve the timeliness of spaceborne synthetic aperture radar (SAR) applications.

[0003] The radar back-projection imaging BP (BackProjection) algorithm performs reverse interpolation operations in the pulse compression echo of the radar echo signal according to the time delay of the radar echo signal, and can reconstruct the target of the radar echo data under any imaging geometry. The radar echo signal received by the radar is a set of reflected pulses from the imaging area, which contains scene information such as the target position and reflection characteristics. The radar back-projection imaging BP algorithm establishes a mapping relationship between the radar echo signal and the imaging scene through the slant range. The imaging grid can be set directly in the target area, and then the contribution of the current echo pulse grid point is reversely found based on the distance between the grid point and the radar. Each time the reverse projection operation is performed, a description of the scene information at the grid point by the radar echo signal can be obtained. By traversing all azimuth pulses and coherently accumulating the projection results of different echo pulses, the target scene can be reconstructed and the image focusing can be completed. The radar back-projection imaging BP algorithm performs reverse projection operations based on the slant range, pulse by pulse, and grid point by grid point. As long as the distance (instantaneous slant range) of the radar antenna phase center at the target grid point P and the coordinates of the imaging grid point can be accurately known, the radar echo data can be focused on without distortion. Therefore, the radar back-projection imaging BP algorithm is not only applicable to various imaging occasions such as arbitrary tracks and arbitrary imaging configurations, but can also realize three-dimensional imaging in combination with scene elevation information.

[0004] The serial imaging process of radar backprojection imaging BP algorithm is as follows: Figure 1, as shown in the flowchart of the SAR radar echo data processing completed serially by the CPU host side, the basic serial radar back-projection imaging BP algorithm imaging process is divided into the reading of radar echo data, pulse compression in the range direction, calculation of parameters required for BP imaging, up-sampling of echo pulses by interpolation, BP imaging, and output of processed radar echo data imaging results. However, the computational complexity of the radar back-projection imaging BP algorithm is proportional to the imaging scale. Assuming that the number of pulses contained in the synthetic aperture is N and the number of imaging grid points is N×N, the computational complexity of the back-projection imaging algorithm is close to O(N 3 ). The serial implementation of radar back-projection imaging BP algorithm is difficult to apply to occasions with large data scale and high real-time requirements.

[0005] At the same time, traditional spaceborne synthetic aperture radars (SAR) are often implemented using hardware designs based on multiple FPGAs (Field Programmable Gate Arrays) or DSPs (Digital Signal Processing). Due to the limitation of the number of FPGA and DSP computing units, the spaceborne synthetic aperture radars (SAR) designed based on FPGA and DSP architectures also have the problem of long radar echo signal processing time, which makes it difficult to meet engineering requirements.

[0006] Therefore, how to reduce the computational complexity of the back-projection imaging BP algorithm and improve the imaging speed has become an important research direction of the time domain algorithm.

[0007] Compared with FPGA and DSP, GPU (Graphics Processing Unit) has more computing units and is more suitable for ultra-large-scale parallel computing. For data that can be processed in parallel in radar echo signal data processing, using multiple GPUs for data processing can compress the data processing time by more than a thousand times, solving the problem of long radar echo signal processing time and difficulty in meeting engineering requirements. Summary of the invention

[0008] In view of the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide a real-time processing method for spaceborne SAR imaging based on multiple servers and multiple GPUs. The method realizes high parallel processing of radar back projection imaging BP data of spaceborne synthetic aperture radar SAR echoes through non-confidential transmission between multiple CPU host ends, control of GPU device ends with multiple GPUs by CPU host ends, and GPU data calculation parallel structure design technology in GPU device ends; and the CPU host end can maximize the use of GPU device end space according to the size of GPU device end storage space, and accelerate the processing of radar echo signal data at the optimal speed.

[0009] Among them, the server is called the CPU host side or the server CPU host side; the GPU is called the GPU device side.

[0010] In order to achieve the above object, the present invention adopts the following technical solutions to achieve it.

[0011] A method for real-time processing of spaceborne SAR imaging based on multiple servers and multiple GPUs comprises the following steps:

[0012] Step 1: read the satellite-borne SAR radar echo data on any server CPU host, and divide the radar echo signal data to multiple server CPU host by using the non-confidential communication between multiple server CPU host;

[0013] Step 2: read the corresponding radar echo signal data parameters and the corresponding multiple GPU device end information on each server CPU host end, and set the number of threads on the server CPU host end;

[0014] Step 3, each GPU device end reads the spaceborne SAR radar echo data divided for it in azimuth direction and the allocated memory of the GPU device end from its corresponding CPU host end;

[0015] Step 4, each GPU device end receives the complex echo of the radar echo signal transmitted from the corresponding server CPU host end;

[0016] Step 5, each GPU device implements pulse compression of the complex echo in the range direction;

[0017] Step 6, implementing BP imaging on the GPU device controlled by each server CPU host;

[0018] Step 7, obtain the BP imaging on all GPU device ends corresponding to all service CPU host ends, and write the radar echo data processing file, use MATLAB to read the processed radar echo data and draw a graph based on the processed radar echo data, and analyze the imaging results.

[0019] Compared with the prior art, the present invention has the following advantages:

[0020] First, the present invention aims at the problem that a single CPU host end and a single GPU device end have memory limitations when processing spaceborne synthetic aperture radar (SAR) radar echo data, and proposes a spaceborne synthetic aperture radar (SAR) radar echo data processing method using multiple CPU host ends and multiple GPU device ends, which successfully avoids the problem of insufficient memory space due to the large amount of radar echo data to be processed;

[0021] Second, the present invention selects to perform parallel calculation of BP imaging on the GPU device side for operation processes that have no data dependencies and a large loop volume, thereby reducing simulation time. For operations that have data dependencies and are not suitable for GPU acceleration during data processing, the simulation time is further reduced by performing multi-threaded data acceleration processing on a multi-CPU host side.

[0022] Third, the present invention determines the variable of adjustable GPU device memory size by analyzing the overall process of radar back-projection imaging BP algorithm and the use of GPU device memory for each data processing task, and dynamically manages the memory of GPU device through CPU host to maximize the memory resource utilization of GPU device.

[0023] Fourth, the present invention divides the computing process processed by the GPU into tasks in the radar back-projection imaging algorithm, hides the memory access delay of each GPU device end through asynchronous processing between GPU device ends, and runs different tasks of the computing process that do not have data dependencies in parallel on the GPU device end, thereby reducing the running time.

[0024] Fifth, the present invention divides the processed radar echo signal data into azimuth data, and cyclically calls the GPU kernel function to traverse all data domains in the radar echo signal, namely: 1) the processed radar echo signal data obtained by the GPU device end G1 in one cycle is transferred to another GPU device end G2 for reprocessing, and the processing result is used to calculate the parameters required for BP imaging; 2) the reprocessing time of G2 is hidden in the time of the next cycle of processing the radar echo signal by the original GPU device end G1; 3) another GPU device G3 waits for the original GPU device ends G1 and G2 to complete all cycles, and performs the next step of imaging processing operation after completing the processing of all radar signal echo data, thereby effectively reducing the simulation time. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0026] Figure 1 It is a flow chart of the SAR radar echo data processing completed serially by the CPU host side;

[0027] Figure 2 It is the overall connection diagram of the real-time processing method of spaceborne SAR imaging based on multi-server CPU and multi-GPU;

[0028] Figure 3 It is a schematic diagram of the process of BP imaging based on a heterogeneous platform with multiple server CPUs and multiple GPUs;

[0029] Figure 4 This is a schematic diagram of the OpenMP working model;

[0030] Figure 5 Schematic diagram of radar echo signal data being divided into blocks according to the amount of data

[0031] Figure 6 It is a schematic diagram of the specific operation process of BP imaging;

[0032] Figure 7 Schematic diagram of the geometric model for obtaining data for strip SAR radar;

[0033] Figure 8 This is a schematic diagram of the relationship between GPU memory and threads;

[0034] FIG9(a) is a schematic diagram of the two data structure organization modes of AoS and SoA, corresponding to the distance- and azimuth-priority storage modes;

[0035] FIG9( b ) is a schematic diagram of thread allocation of kernel functions Kernel1-Kernel8;

[0036] FIG9( c ) is a schematic diagram of thread allocation of kernel function Kernel9;

[0037] Fig.10 This is a simulation diagram of measured data without adopting the real-time processing method of spaceborne SAR imaging based on multiple servers and multiple GPUs of the present invention;

[0038] FIG11( a ) is a radar echo signal acquired by the spaceborne SAR in the present invention;

[0039] FIG11( b ) is an image obtained by processing the radar echo signal in the present invention. DETAILED DESCRIPTION

[0040] 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.

[0041] Reference Figure 2 , which is the overall connection diagram of the real-time processing method of spaceborne SAR imaging based on multiple servers and multiple GPUs. It is divided into three modules: a non-cryptographic communication module between multiple CPU hosts, a spaceborne SAR data preprocessing module, and a GPU device-side BP imaging module, which specifically includes the following functions:

[0042] 1) Secret-free communication module between multiple CPU hosts: The secret-free communication module between multiple CPU hosts implements secret-free communication between CPU hosts through MPI.

[0043] 2) Spaceborne SAR data preprocessing module: The spaceborne SAR data preprocessing module mainly includes the CPU host side reading radar echo signal data parameters and GPU device side information, the GPU device side reading radar echo signal data from the CPU host side, the GPU device side generating complex echoes, and the GPU device side's distance pulse compression function.

[0044] 3) BP imaging module on GPU device side: The BP imaging module on GPU device side is completely implemented on the GPU device side, and mainly includes: (1) constructing a coordinate system for the radar and the target, that is, calculating the radar target position, so as to realize projection for the target and the radar; (2) selecting the effective imaging area of ​​BP imaging, so as to facilitate the subsequent determination of the echo coherent accumulation area; (3) dividing the ground grid, that is, performing the same projection and accumulation operations on all grid points to achieve image focusing; (4) dividing the BP imaging effective area, including the selection of the starting and radar position effective areas, and the selection of the effective aperture; (5) using sinc interpolation to perform interpolation calculations to determine the contribution of the echo pulse to each grid point; (6) performing range phase compensation to realize BP imaging.

[0045] In the present invention, a CPU host end can control multiple GPU device ends, a CPU host end can read information of multiple GPU device ends, and the number of GPU device ends specifically controlled by a CPU host end depends on the number of interfaces on the CPU host end.

[0046] Each GPU device end reads radar echo signal data of corresponding data block size (range storage is preferred) and radar back-projection imaging BP algorithm parameter information from the corresponding CPU host end in azimuth blocks according to the memory allocated to it by the corresponding CPU host end, reads simulation parameters from the corresponding CPU host end to the constant storage area of ​​the GPU device end, and reads adaptive block radar echo signal data from the corresponding CPU host end to the global memory of the GPU device end; through multiple GPU device ends controlled by multiple CPU host ends, range pulse compression, parameter calculation required for BP imaging, and upsampling of echo pulses are completed on each GPU device end, and the CPU host end distributes the parameter calculation results in the radar back-projection imaging BP algorithm and the up-sampled echo pulses to different GPU device ends, and finally BP imaging is realized through the GPU device end.

[0047] In order to meet the requirements of faster imaging processing and considering the large amount of data processed by spaceborne SAR, a spaceborne SAR imaging real-time processing method based on multiple servers and multiple GPUs is used. Figure 3 , is a schematic diagram of the process of BP imaging based on a heterogeneous platform of multiple CPUs and multiple GPUs, which includes the following specific steps:

[0048] Step 1: Read the spaceborne SAR radar echo data on any server CPU host, and use the non-encrypted communication between multiple server CPU hosts to divide the radar echo signal data to multiple server CPU hosts.

[0049] The specific steps are to achieve non-confidential communication between any server CPU host and other server CPU host through MPI (Massage Passing Interface). (1) Log in to each CPU host through the ssh (Secure Shell) network security protocol; (2) Generate the same radar echo signal data storage path on each server CPU host; (3) Put the same execution configuration file in the same directory of the same storage path on the server CPU host; (4) When executing the same execution configuration file in (3) on different server CPU hosts, start each server CPU host at the same time to obtain more server CPU host threads; (5) Use OpenMP to assign tasks in the radar back-projection imaging BP algorithm to different server CPU host threads to achieve task-level parallelism.

[0050] Among them, OpenMP is a multi-threaded programming scheme for shared memory parallel systems. OpenMP provides a high-level abstract description of parallel algorithms and is particularly suitable for parallel programming on multi-core CPU machines. The compiler automatically processes the program in parallel according to the pragma instructions added to the program. The use of OpenMP reduces the difficulty and complexity of parallel programming. When the compiler does not support OpenMP, the program will degenerate into a normal (serial) program. The existing OpenMP instructions in the program will not affect the normal compilation and operation of the program.

[0051] The specific OpenMP working model is as follows Figure 4, as shown in the schematic diagram of the OpenMP working model, is a multi-threaded programming solution for shared memory parallel systems, supporting programming languages ​​including C, C++, and Fortran. At the beginning, there is only one main thread. When parallel computing is required, several branch threads are derived to perform parallel tasks. When the parallel code is executed, the branch threads meet and hand over the control flow to a separate main thread. OpenMP provides a high-level abstract description of parallel algorithms, which is particularly suitable for parallel programming on multi-core CPU machines. The compiler automatically processes the program in parallel according to the pragma instructions added to the program. The use of OpenMP reduces the difficulty and complexity of parallel programming. When the compiler does not support OpenMP, the program will degenerate into a normal (serial) program. The existing OpenMP instructions in the program will not affect the normal compilation and operation of the program. OpenMP adopts the fork-join execution mode.

[0052] The above-mentioned MPI technology can be used to complete the configuration of secret-free communication between the CPU hosts of each server, and realize secret-free communication between the CPU hosts of each server, so that the CPU host can call more threads to control the GPU device, thereby improving the data transmission efficiency between the CPU host and the GPU device.

[0053] Step 2: Read the corresponding radar echo signal data parameters and the corresponding multiple GPU device information on each server CPU host, and set the number of threads on the server CPU host.

[0054] The corresponding GPU device information read by each server CPU host includes: graphics card model, device computing power, total global memory, upper and lower limits of the device's grid block thread division, and the number of range points of the spaceborne SAR radar echo data that needs to be processed (assuming that the number of spaceborne SAR echo points that need to be processed is Nr*Na, representing the range Nr and azimuth Na of the echo data, where * represents a multiplication operation).

[0055] The server CPU host sets the same number of host threads as the GPU device according to the GPU device information read, that is, one server CPU host thread controls one GPU device. The radar echo signal data processing tasks and parameter calculation tasks in the radar backprojection imaging BP algorithm are assigned to different CPU host threads through OpenMP to achieve task-level parallelism.

[0056] Specifically, according to the performance requirements of the radar back-projection imaging algorithm, the radar back-projection imaging BP algorithm related parameters are encapsulated into a class, and these imaging related parameters are changed according to specific imaging requirements.

[0057] Step 3: Each GPU device reads the radar echo signal data divided for it in azimuth from its corresponding server CPU host, as well as the allocated memory of the GPU device.

[0058] Each GPU device reads the radar echo signal data of the radar azimuth block and the parameter information required by the radar back-projection imaging algorithm from the corresponding server CPU host.

[0059] According to step 2, the server CPU on the host side divides the spaceborne SAR radar echo data in azimuth and allocates memory on the device side based on the corresponding GPU computing power, the total global memory, and the number of range points of the spaceborne SAR echo data to be processed (assuming that the number of spaceborne SAR echo points to be processed is Nr*Na, representing the range Nr and azimuth Na of the echo data, respectively).

[0060] Among them, when dividing the space-borne SAR radar echo data, it should be noted that before the subsequent step of implementing the range pulse compression operation, the radar echo signal data needs to be subjected to the range Fourier transform. The range Fourier transform will additionally open up GPU device-side memory, which will cause the data space actually processed by the GPU device side for Fourier transform to be temporarily expanded to three times the original space allocated only for the radar echo signal data. Therefore, when performing azimuth data segmentation of the radar echo signal data on the CPU host side, a certain amount of GPU memory space needs to be reserved on the GPU device side.

[0061] The specific operation is: the server CPU host reads the corresponding GPU device information, and according to the total global memory of the GPU device information, multiplies the total global memory of the GPU device information by 0.3 to set the total amount of GPU memory that is actually available. Figure 5 As shown, Figure 5 The following is a schematic diagram of the azimuth division of radar echo signal data according to the data volume. Since the echo data is two-dimensional, it is divided into the distance direction and the azimuth direction. In the figure, the distance direction is from top to bottom, and the azimuth direction is from left to right. In this invention, the incoming radar echo data is stored in the distance direction first. In order to avoid the jump reading of the memory and increase the time consumption, the azimuth radar echo data block is performed. It is assumed that the echo data is divided into n blocks according to the azimuth direction, which is expressed as blk_num. The specific number of blocks depends on the size of the radar echo data, the operations performed in the subsequent steps, and the size of the GPU video memory.

[0062] The CPU host side opens the host side thread number cpu_trd_num according to the GPU device number gpu_num, such as Figure 5The number of GPU devices is equal to 4, and each host thread is responsible for n / 4 blocks of radar echo data. According to the GPU device information read in step 2, the CPU host adaptively completes the adaptive block division of the radar echo signal data in the azimuth direction according to the number of GPU devices, and allocates different blocks to different threads of the CPU host, which are controlled by each thread of the CPU host to be transmitted to different GPU devices.

[0063] Step 4: Each GPU device receives the complex echo of the radar echo signal transmitted from the corresponding server CPU host.

[0064] Each server CPU host performs data processing according to different types of radar echo signal data received. There are two situations in which radar echo signal data is transmitted to the server CPU host: one is that the real part and the imaginary part are transmitted separately, and the other is that the complete complex signal is transmitted.

[0065] (1) If the radar echo signal is divided into real and imaginary parts and transmitted separately, the server CPU host side adaptively allocates memory on the GPU device side according to the size of the incoming spaceborne SAR radar echo signal data, and transmits the real and imaginary parts of the radar echo signal to the GPU device side respectively, and then uses the kernel function GnrEcho on the GPU device side to complete the splicing of the real and imaginary parts of the radar echo signal on the GPU device side; (2) If the radar echo signal data is a complete complex echo signal, this step is skipped.

[0066] Step 5: Each GPU device implements pulse compression of the complex echo in the range direction.

[0067] The GPU device calls the Fast Fourier Transform (FFT) related functions in the NVIDIA CUDA (Compute Unified Device Architecture) library to perform a range-oriented Fast Fourier Transform (FFT) on the complex echo data that has been read by the GPU device, transforming the radar echo complex data into the range frequency domain corresponding to the azimuth time domain, and multiplying the radar echo signal data in the range frequency domain by a matched filter to achieve radar echo signal pulse compression.

[0068] The specific steps are as follows: based on the radar echo signal data division made in step 3, openMP is used on the server CPU host to realize CPU multi-thread control, and multiple GPU devices are further controlled in the server CPU host thread to perform related parallel calculations: (1) the built-in library function cuFFT of cuda is called on the GPU device to perform range FFT on the radar echo signal data that has been read from the server CPU host and has completed azimuth block division, and the echo signal is transformed into the range frequency domain to prepare for subsequent pulse compression; (2) according to the radar simulation parameters, the echo data is matched filtered in the azimuth time domain and the range frequency domain, that is, a matched filter is generated in each range nrn (the index of the range Nr), the formula is exp(j*pi*f*f / Bp*Tp), where f=nrn / Nr*fr; where f is the range sampling frequency, Bp is the signal bandwidth, Tp is the pulse repetition interval, and fr is the radar pulse frequency; (3) finally, the radar echo data after step (1) is complex multiplied by the matched filter to complete the range pulse compression. The kernel function Pul_press is used on the GPU device to implement the range pulse pressure of the radar echo signal data.

[0069] Step 6: Implement BP imaging on the GPU device controlled by each server CPU host.

[0070] On the GPU device controlled by each server CPU host, the parameters required for BP imaging are calculated, such as Figure 6 , which is a schematic diagram of the specific operation process of BP imaging.

[0071] The BP imaging process is completed on the GPU device side: (1) First, a coordinate system for the radar and the target is constructed, that is, the radar target position is calculated, so as to realize projection for the target and the radar; (2) The effective imaging area of ​​BP imaging is selected to facilitate the subsequent determination of the echo coherent accumulation area; (3) The ground grid is divided, and the same projection and accumulation operations are performed on all grid points to achieve image focusing; (4) The effective area of ​​the radar position is selected; (5) The effective aperture is selected; (6) The contribution of the echo pulse to the grid point is calculated by slnc interpolation, and the echo pulse is upsampled by interpolation before BP imaging; (7) The parameter calculation results of the server CPU host side and the upsampled echo pulse are distributed to different GPU devices. The BP imaging is realized by repeatedly executing projection and accumulation on the GPU device side.

[0072] Specifically, step 6.1, BP imaging parameters and settings.

[0073] The relationship between the three-dimensional position of the radar in the Cartesian coordinate system is as follows: Figure 7 , as shown in the schematic diagram of the geometric model of strip SAR radar data acquisition, Figure 6 , which is a schematic diagram of the specific operation flow of BP imaging, and the three-dimensional position information of the radar is obtained by calculation in the Kernel3 kernel.

[0074] When establishing three-dimensional coordinates for the radar position, there are two data organization methods. Different data organization methods will have different effects on the core performance. As shown in Figure 9(a), the two data structure organization methods AoS and SoA correspond to the range and azimuth priority storage methods: the first method is the data structure (AoS), which corresponds to the azimuth priority storage of radar echo data; the second method is the structure array (SoA), which corresponds to the range priority storage of radar echo data. The AoS data organization method will cause non-aligned and non-continuous memory access when accessing the x array, y array, and z array of the radar coordinate position, which seriously affects the memory read and write speed and reduces the core performance. The use of the SoA data organization method effectively avoids the disadvantages of AoS. While storing the radar position coordinates, aligned and continuous memory access can be performed, making the core performance more efficient.

[0075] As shown in Figure 9(b), which is a thread allocation diagram of kernel functions Kernel1-Kernel8, there are three types of indexes inside the GPU kernel function. The first is the horizontal distribution of index threads, which represents the target point in the distance direction of the target scene, denoted as idx, and is calculated as nrn=blockIdx.x*blockDim.x+threadIdx.x, where blockIdx.x corresponds to each thread block in Figure 9(b), blockDim.x corresponds to the dimension corresponding to each thread block in Figure 9(b), and threadIdx.x corresponds to the thread bundle index in the thread block of each dimension in Figure 9(b), and the number of thread bundles can be a multiple of 16; the second is the vertical distribution of index threads, which represents the target point of the target scene in the azimuth direction, denoted as idy, and is calculated as nan=blockIdx.y*blockDim.y+thr eadIdx.y; where blockIdx.y corresponds to Figure 9(c), which is the thread blocks in the thread allocation diagram of the kernel function Kernel9, blockDim.y corresponds to the dimensions corresponding to the thread blocks in Figure 9(c), and threadIdx.y corresponds to the thread bundle index in the thread blocks of each dimension in Figure 9(c). The number of thread bundles can be a multiple of 16; the third method is to determine the offset of each target in the overall radar echo data after blocking by indexing the starting point coordinates of each block after azimuth blocking, denoted as Echo_offset, and the calculation method is Echo_offset = Na_offset*len[i], where len[i] represents the block number of the radar signal echo target area, Na_offset represents the azimuth offset of each block, and the azimuth offset of each different block is obtained by multiplying it with len[i].

[0076] The three-dimensional coordinates of the radar target point are determined by the thread index, and the calculation results are stored in the array allocated in the GPU video memory by row. When calling the kernel function for calculation, it is called by row to form aligned and continuous memory access, which reduces cross-memory access and ensures that the kernel function that processes the radar echo data in the distance direction has good kernel performance. The starting point coordinates of each radar echo data block in the azimuth direction are determined according to the thread index.

[0077] In the program, the specific BP imaging related parameters are encapsulated as a class, and these imaging related parameters are changed according to specific imaging requirements.

[0078] Step 6.2, complete BP imaging.

[0079] The pulse compression and BP imaging parameters of spaceborne SAR radar echo data in the range direction are analyzed, and the upsampling of echo pulses is realized by interpolation to realize the dependency before and after BP imaging processing. For operation processes with data dependency and large for loop volume, multi-threaded acceleration is performed by using openMP on the CPU host side; conversely, for operation processes without data dependency and large loop volume, CUDA is used on the GPU device side for acceleration.

[0080] Among them, common interpolation methods include linear interpolation after upsampling, spline interpolation, and sinc interpolation, etc. The appropriate interpolation method can be selected by comprehensively considering the imaging quality and real-time requirements. In the present invention, sinc interpolation is selected.

[0081] Before BP imaging, sinc interpolation is used to achieve upsampling of echo pulses. The CPU host distributes the calculation results of various parameters and the upsampled echo pulses to different GPU devices, which repeatedly perform projection and accumulation to achieve BP imaging.

[0082] In addition, for operations without data dependency in BP imaging and parameter calculation before BP imaging, the following kernel functions are used on the GPU device side to implement them;

[0083] Kernel1: GnrEcho: If the spaceborne SAR radar echo data is in the form of separated real and imaginary parts, this kernel function is used to combine the real and imaginary parts of the spaceborne SAR radar echo data.

[0084] Kernel2: Pul_Press: For the radar echo data that has undergone the range Fourier transform, multiply it by a matched filter to achieve the range pulse compression of the radar echo data;

[0085] Kernel3: InitSensorPos: Calculate the radar position information and build the coordinate system of the radar and the target;

[0086] Kernel4, Init_Sig_stav: Select the starting position and the effective area of ​​the radar position;

[0087] Kernel5, Kernel6: Init_Grdx and Init_Grd_dlt_y: divide the ground grid;

[0088] Kernel7, Kernel8: Init_Senpos and Init_AzSE: Select the effective aperture;

[0089] Kernel9: ProcessPoint: Completes sinc interpolation of echo data to achieve upsampling; completes calculation of radar antenna center phase and target instantaneous slant range; completes range phase compensation at the same time; and finally completes BP imaging.

[0090] like Figure 3 , which is a flowchart of BP imaging based on a heterogeneous platform with multiple CPUs and multiple GPUs. Figure 6 , as shown in the specific operation flow diagram of BP imaging, in the BP imaging stage, the BP imaging tasks are divided and the data dependency is analyzed. If the data processed by Kernel1, Kernel2, Kernel3, and Kernel4 have data dependency, they can be first assigned to the GPU device end and run one kernel function after another in sequence;

[0091] The input data of Kernel5 and Kernel6 are related to the data processed by the four kernel functions Kernel1, Kernel2, Kernel3, and Kernel4. After the four kernel functions Kernel1, Kernel2, Kernel3, and Kernel4 are operated, the operation results are placed on the GPU device side: Kernel5 and Kernel6 need to wait for the above kernel functions Kernel1-Kernel4 to complete the operation before performing the operation. Consider adding blocking before the execution of Kernel5 kernel function;

[0092] Kernel 7 and Kernel 8 need to wait for Kernel 3 to complete before performing operations. Kernel 3, Kernel 7 and Kernel 8 can be placed in the same workflow to minimize the time spent on data transmission between the GPU device and the CPU host.

[0093] After completing the above kernel function operation, Kernel9 is used to complete BP imaging. Considering the memory consumption and the overlapping calculations between various GPU devices, the data offset based on azimuth priority storage can be calculated, including the offset of rows and columns, to achieve parallel processing of multiple GPUs and further improve the efficiency of the algorithm.

[0094] Step 7: Obtain BP imaging on all GPU devices corresponding to all service CPU host ends, and write radar echo data processing files, use MATLAB to read the processed radar echo data and draw plots based on the processed radar echo data to analyze the imaging results.

[0095] The effect of the present invention is further described below in conjunction with simulation experiments.

[0096] (1) The measured data simulation of the real-time processing method of spaceborne SAR imaging based on multiple servers and multiple GPUs of the present invention is not adopted.

[0097] Simulation experiment parameters: pulse echo point number 12288, pulse echo period 2.5e-6s, pulse echo bandwidth 2.997e+9, pulse echo frequency 3.5975e+5, radar speed 7400m / s.

[0098] The simulation steps are:

[0099] 1) Host-side echo data reading;

[0100] 2) Distance pulse compression at the host end;

[0101] 3) Parameter calculation of BP imaging on the host side: including the construction of the coordinate system for the radar and the target, the selection of the effective imaging area of ​​BP imaging, the division of the ground grid, where the division of the effective area of ​​BP imaging includes the selection of the effective aperture, and the selection of the effective area of ​​the starting and radar positions;

[0102] 4) Host-side BP imaging.

[0103] like Figure 1 , as shown in the flowchart of the serial completion of SAR echo data by the CPU host side, when the radar echo signal data is serially processed on the CPU host side, 1) first read the simulation parameters, and encapsulate the simulation parameters required for SAR echo formation into a class, which can be directly called by the header file included in the program; 2) the CPU host side reads the echo data in the satellite-borne SAR echo data file, selects the required imaging area in the echo data as the effective imaging area, and determines the number of target points according to the specific imaging requirements; 3) after completing the calculation of each target point in the azimuth and range directions, the pulse pressure in the range direction is realized; 4) the echo data is imported into the range frequency domain and the azimuth time domain, and the simulation parameters are further continued; 5) then the real-time distance of each target point within the radar operation time is calculated according to the simulation parameters, and the target point is judged whether it is just within the irradiation range of the radar antenna transmission beam according to the real-time distance, and the echo of the target point within the irradiation range of the beam is calculated, and the phase compensation is performed in the range direction, and the echo data of the target point after the phase compensation is performed in the azimuth direction are accumulated.

[0104] The simulation data results are as follows Fig.10 , which is a simulation diagram of measured data without adopting the real-time processing method for spaceborne SAR imaging based on multiple servers and multiple GPUs of the present invention.

[0105] (2) Simulation of measured data using the real-time processing method for spaceborne SAR imaging based on multiple servers and multiple GPUs of the present invention.

[0106] The parameter settings in this simulation are the same as those in Simulation 1. The simulation steps are:

[0107] 1) The CPU host reads the echo data;

[0108] 2) The GPU device performs distance pulse compression;

[0109] 3) Parameter calculation of BP imaging on the GPU device side: including the construction of the coordinate system for the radar and the target, the selection of the effective imaging area of ​​BP imaging, the division of the ground grid, where the division of the effective area of ​​BP imaging includes the selection of the effective aperture, and the selection of the effective area of ​​the starting and radar positions;

[0110] 4) GPU device completes BP imaging. The specific steps are: (1) Read device information on the host side, complete the adaptive block division of data on the host side, call the kernel function GnrEcho, loop through all blocks, the number of loops is determined by the data size; (2) After completing the reading of this data, call the kernel function pul_press to complete the range pulse compression, set asynchronous blocking to ensure that all echo data complete the range pulse compression before the next step of processing; (3) Based on the data block division after completing the range pulse compression, call the kernel function InitSensorPos in sequence to build the coordinate system of the radar and the target; (4) Kernel function I nit_Sig_stav completes the selection of the starting position and the effective area of ​​the radar position; (5) The ground grid is divided through the kernel function Init_Grdx and the kernel function Init_Grd_Slt_y; (6) The imaging coordinate system is constructed and the effective aperture is selected through the kernel function Init_Senpos and the kernel function Init_AzSE; (7) According to the situation of the GPU on the device side, the data size and the parameter calculation, the optimal parallelization method is selected to reduce the time consumption of data transmission and achieve the optimal processing result on the BP imaging device side.

[0111] The following is a detailed introduction to the kernel functions that appear in the entire process, focusing on the division of grids and blocks in each kernel function on the GPU device side: TrdNum and BlkNum; clarifying the meaning of each kernel function and the encapsulation of each kernel function interface, and clearly allocating the GPU device-side memory size.

[0112] The number of GPU devices is 4, and the GPU memory size is 32G. This configuration is smaller than the amount of radar echo data that needs to be processed. Considering that auxiliary data will be temporarily calculated during fast Fourier transform (FFT), phase compensation, and interpolation calculations, the calculation of auxiliary data occupies additional GPU memory. At this time, it is necessary to consider the maximum utilization of the memory and use the GPU device information read by the CPU host to reasonably allocate the GPU device memory.

[0113] Configure threads for each kernel function to achieve thread-level parallelism, and ensure that the kernel function has the best performance based on certain principles; clarify the index content and data organization method within the kernel, optimize the internal calculation of the kernel function, and optimize the performance of the kernel function. Configure grid block threads for each kernel function, and the configuration should follow the following principles to ensure that the kernel function has good performance:

[0114] (1) The lengths of the grids and blocks configured for the kernel function in the x, y, and z dimensions do not exceed the limits of the GPU device. The closer the configuration is to the limits of the GPU device, the better the performance is.

[0115] (2) The number of threads configured for each kernel function should be an integer multiple of 32, and preferably greater than 4*32 threads. This is because the GPU processes threads on the hardware streaming multiprocessor SM in units of a warp. A warp consists of 32 threads. Placing four warps on the hardware streaming multiprocessor SM for parallel processing can effectively hide memory access latency and improve kernel performance. The more warps placed on the hardware streaming multiprocessor SM, the better the effect of hiding memory access latency.

[0116] (3) The performance of each kernel function will be affected by the configuration. To obtain the best configuration, multiple tests are required. By running the kernel function with different configurations and using tools to test the running time of the kernel function multiple times, the configuration with the shortest running time can be obtained.

[0117] Below is the relationship between the memory distribution of GPU devices and grids, blocks, and threads. Figure 8, as shown in the diagram of the relationship between GPU memory and threads: By declaring the kernel function in advance, the number of thread grids, the number of thread blocks and the number of threads are set. When a grid of a thread block is started, the thread blocks in the grid are distributed in the SM (Streaming Multiprocessor). Once a thread block is scheduled to an SM, the threads in the thread block are further divided into thread bundles. The thread blocks in a kernel function may be scheduled to different SMs. Thread bundles are the basic execution units in SM. A thread bundle consists of multiple continuous threads, and in a thread bundle, all threads execute simultaneously. In the GPU memory hierarchy, the two main types of memory are global memory and shared memory. Global memory is similar to the CPU system memory, while shared memory is similar to the CPU cache. The shared memory of the GPU can be directly controlled by the CUDAC kernel, that is, declared inside the kernel function; while the global memory of the GPU moves the data on the CPU host side to the global memory of the GPU through the data operation instructions of CUDAC, and then uses the kernel function to access the GPU global memory for parallel computing. The kernel functions used on the GPU, kernel function functions, kernel function variables and kernel function allocation space are as follows. The kernel function name of Kernel1 is GenEcho, which combines the real and imaginary parts of the radar echo signal data to generate a complete complex signal. The thread configured in the block is GenEchoThread(512,1), and the block configured in the grid is The meaning is to create a size of The thread grid is a thread block, where the unit of the thread grid is a thread block. 512*1 threads are configured in the block. The block configuration can be automatically adjusted according to the thread configuration. The schematic diagram is shown in Figure 9(b), which is a thread allocation diagram of kernel functions Kernel1-Kernel8. Thread indexes are established in the kernel, and the thread indexes are set to idx and idy, corresponding to the distance and azimuth indexes respectively. According to the kernel configuration, the idx index is determined by the thread X-direction offset, the block X-direction offset and the size of the block. The kernel function idx index is calculated as idx = blockIdx.x * blockDim.x + threadIdx.x, where blockIdx.x corresponds to the index of each thread block in GenEchoblocks.x, blockDim.x corresponds to the dimension corresponding to each thread block in GenEchoblocks.x, and threadIdx.x corresponds to the thread block of each dimension in GenEchoblocks.x. The thread bundle index in , the number of thread bundles can be a multiple of 16, and the index range is [0, Nr] for the distance index; the idy index is determined by the size of the block, and the kernel function idy index calculation method is idy = blockIdx.y, where blockIdx.y corresponds to the index of each thread block in GenEchoblocks.y, blockDim.y corresponds to the dimension corresponding to each thread block in GenEchoblocks.y, and threadIdx.y corresponds to the thread bundle index in each dimension thread block in GenEchoblocks.y. The number of thread bundles can be a multiple of 16, and the index range is [0, Na] for the azimuth index, representing the azimuth. Use the above index to traverse the variable address space in the GPU video memory, and assign values ​​and data calculations to the array elements of the array opened for the GPU video memory. The array variables allocated to the Kernel1 kernel function are d_Recho, d_Iecho, d_echo, and Nr, where Recho represents the real part of the data, Iecho represents the imaginary part of the data, Echo represents the complex data, and Nr represents the distance length of the data storage; the allocated GPU memory space is sizeof(float)*Na*Nr, sizeof(float)*Na*Nr, and sizeof(c_float)*Na*Nr; c_float is a complex signal with real and imaginary parts as float defined by cuda_complex.cuh.

[0118] The kernel function name of Kernel2 is pul_press, the thread configured in the block is pul_pressThread(512,1), and the block configured in the grid is The meaning is to create a size of The thread grid is a thread block, where the unit of the thread grid is a thread block. 512*1 threads are configured in the block. The block configuration can be automatically adjusted according to the thread configuration. The schematic diagram is shown in Figure 9(b), which is a thread allocation diagram of kernel functions Kernel1-Kernel8. Thread indexes are established in the kernel, and the thread indexes are set to idx and idy, corresponding to the distance and azimuth indexes respectively. According to the kernel configuration, the idx index is determined by the thread X-direction offset, the block X-direction offset and the size of the block. The kernel function idx index is calculated as idx = blockIdx.x * blockDim.x + threadIdx.x, where blockIdx.x corresponds to each thread block in pul_pressblocks.x, blockDim.x corresponds to the dimension corresponding to each thread block in pul_pressblocks.x, and threadIdx.x corresponds to pul_press The thread bundle index in each dimension thread block in blocks.x, the number of thread bundles can be a multiple of 16, and the index range is [0, Nr]; the kernel function idy index calculation method idy = blockIdx.y, where blockIdx.y corresponds to the thread block index in pul_pressblocks.y, blockDim.y corresponds to the dimension corresponding to each thread block in pul_pressblocks.y, and threadIdx.y corresponds to the thread bundle index in each dimension thread block in pul_pressblocks.y, the number of thread bundles can be a multiple of 16, and the index range is [0, Na]. Use the above index to traverse the variable address space in the GPU video memory, assign values ​​to the array elements of the array opened for the GPU video memory and perform data calculations.

[0119] The function is to complete the pulse compression of radar echo data in the range direction. A temp_MatchFun is generated in a kernel function Pul_press. According to the calculation formula of the matched filter, exp(i*pi*f*f / Bp*Tp), where f=nrn / Nr*fr, is the matched filter in each range direction. The matched filter in each range direction is multiplied by the frequency domain signal in each range direction to complete the pulse compression in the range direction. Among them, the array variables allocated to the function are d_echo, Nr, Fr, Br, Tr, where echo is the echo data, Nr is the azimuth length, Fr is the radar pulse frequency, and Br is the radar pulse bandwidth; the allocated space is sizcof(c_float)*Na*Nr, sizeof(c_float)*Nr, c_float represents the complex float signal, Nr and Na represent the size in the range and azimuth respectively, and the radar echo data is matched filtered in the azimuth direction using the calculation formula of the matched filter to complete the pulse compression in the range direction.

[0120] The kernel function of Kernel3 is named InitSensorPos, the thread configured in the block is InitSensorPosThread(512,1), and the block configured in the grid is The meaning is to create a size of The thread grid is a thread block, where the unit of the thread grid is a thread block. 512*1 threads are configured in the block. The block configuration can be automatically adjusted according to the thread configuration. The schematic diagram is shown in Figure 9(b), which is a thread allocation diagram of kernel functions Kernel1-Kernel8. Thread indexes are established in the kernel, and the thread indexes are set to idx and idy, corresponding to the distance and azimuth indexes respectively. According to the kernel configuration, the idx index is determined by the thread X-direction offset, the block X-direction offset and the size of the block. The kernel function idx index is calculated as idx = blockIdx.x * blockDim.x + threadIdx.x, where blockIdx.x corresponds to the index of each thread block in InitSensorPosblocks.x, blockDim.x corresponds to the dimension corresponding to each thread block in InitSensorPosblocks.x, and threadIdx.x corresponds to the dimension corresponding to each thread block in InitSensorPosblocks.x. The thread bundle index in each dimension thread block, the number of thread bundles can be a multiple of 16, and the index range is [0, Nr] for the distance index; the kernel function idy index calculation method is idy = blockIdx.y, where blockIdx.y corresponds to the thread block index in InitSensorPosblocks.y, blockDim.y corresponds to the dimension corresponding to each thread block in InitSensorPosblocks.y, and threadIdx.y corresponds to the thread bundle index in each dimension thread block in InitSensorPosblocks.y. The number of thread bundles can be a multiple of 16, and the index range is [0, Na] for the azimuth index, representing the azimuth. Use the above index to traverse the variable address space in the GPU video memory, and assign values ​​and data calculations to the array elements of the array opened for the GPU video memory.

[0121] Function is completed as Figure 6 , which is the coordinate system construction of BP imaging shown in the schematic diagram of the specific operation process of BP imaging. The relationship between the three-dimensional position of the radar in the Cartesian coordinate system is as follows: Figure 7, as shown in the schematic diagram of the geometric model of strip SAR radar data acquisition, the three-dimensional position information of the radar is calculated in the kernel. The meaning of each variable is: sensor_pos is saved in the coordinate system, Vr is the azimuth speed of the radar, H is the flight altitude of the radar, PRF is the pulse repetition sampling frequency, the space allocated for sensor_pos is sizeof(double)*3, and the generated sensor_pos stores the instantaneous slant range, the imaging size in each azimuth direction, and the radar flight altitude H in the order of storage. The construction of the coordinate system based on the target and the radar is completed through this kernel function.

[0122] The kernel function name of Kernel4 is Init_Sig_staV, the configuration thread in the block is Init_Sig_staVThread(512,1), and the configuration block in the grid is The meaning is to create a size of The thread grid is a thread block, where the unit of the thread grid is a thread block. 512*1 threads are configured in the block. The block configuration can be automatically adjusted according to the thread configuration. The schematic diagram is shown in Figure 9(b), which is a thread allocation diagram of kernel functions Kernel1-Kernel8. Thread indexes are established in the kernel, and the thread indexes are set to idx and idy, corresponding to the distance and azimuth indices respectively. According to the kernel configuration, the idx index is determined by the thread X-direction offset, the block X-direction offset and the size of the block. The kernel function idx index is calculated as idx = blockIdx.x*blockDim.x+threadIdx.x, where blockIdx.x corresponds to the index of each thread block in Init_Sig_staVPosblocks.x, blockDim.x corresponds to the dimension corresponding to each thread block in Init_Sig_staVPosblocks.x, and threadIdx.x corresponds to the dimension corresponding to each thread block in Init_Sig_staVPosblocks.x. The thread bundle index in each dimension thread block, the number of thread bundles can be a multiple of 16, and the index range is [0, Nr] for the distance index; the kernel function idy index calculation method is idy = blockIdx.y, where blockIdx.y corresponds to the thread block index in Init_Sig_staVPosblocks.y, blockDim.y corresponds to the dimension corresponding to each thread block in Init_Sig_staVPosblocks.y, and threadIdx.y corresponds to the thread bundle index in each dimension thread block in Init_Sig_staVPosblocks.y, the number of thread bundles can be a multiple of 16, and the index range is [0, Na] for the azimuth index, representing the azimuth. Use the above index to traverse the variable address space in the GPU video memory, and assign values ​​and data calculations to the array elements of the array allocated for the GPU video memory.

[0123] Function is completed Figure 6 , is a selection module for the effective area of ​​BP imaging shown in the specific operation flow diagram of BP imaging. The array variables allocated to the kernel function are Sig_staV, LenNa, Sig_start, Tr;

[0124] Among them, Sig_staV represents the size of the azimuth imaging area, the allocated space size is sizeof(double)*LenNa, LenNa is the selected azimuth effective length, Sig_start is the index of the start of azimuth imaging, Tr is the radar pulse period, and the kernel function can be used to complete the selection of the effective azimuth imaging area.

[0125] The kernel5 kernel function name is Init_Grdx, the configuration thread in the block is Init_GrdxThread(512,1), and the configuration block in the grid is The meaning is to create a size of The thread grid is a thread block, where the unit of the thread grid is a thread block. 512*1 threads are configured in the block. The block configuration can be automatically adjusted according to the thread configuration. The schematic diagram is shown in Figure 9(b), which is a thread allocation diagram of kernel functions Kernel1-Kernel8. A thread index is established in the kernel, and the thread index is set to idx, corresponding to the distance index. According to the kernel configuration, the idx index is determined by the thread X-direction offset, the block X-direction offset, and the size of the block. The kernel function idx index is calculated as idx=blockIdx.x*blockDim.x+threadIdx.x, where blockIdx.x corresponds to the index of each thread block in Init_GrdxPosblocks.x, blockDim.x corresponds to the dimension corresponding to each thread block in Init_GrdxPosblocks.x, and threadIdx.x corresponds to the thread bundle index in the thread block of each dimension in Init_GrdxPosblocks.x. The number of thread bundles can be a multiple of 16, and the index range is [0, 2*Hf_az]. Use the above index to traverse the variable address space in the GPU video memory, assign values ​​to the array elements of the array allocated for the GPU video memory, and perform data calculations.

[0126] Function is completed Figure 6 , which is the azimuth division module of the ground grid in the X direction as shown in the specific operation flow diagram of BP imaging. The array variables allocated to this kernel function are Grd_x, Cen_pos2, Hf_az, and Pix_az; Grd_x means the created azimuth grid, and the allocated space is sizeof(double)*2*Hf_az, where Hf_az is the number of azimuth grid points, Cen_pos2 indicates the azimuth distance from the grid center point to the radar, and Pix_az indicates the azimuth resolution.

[0127] The kernel function name of Kernel6 is Init_Grd_Slt_y, the configuration thread in the block is Init_Grd_Slt_yThread(512,1), and the configuration block in the grid is The meaning is to create a size of The thread grid is a thread block, where the unit of the thread grid is a thread block. 512*1 threads are configured in the block. The block configuration can be automatically adjusted according to the thread configuration. The schematic diagram is shown in Figure 9(b), which is a thread allocation diagram of kernel functions Kernel1-Kernel8. A thread index is established in the kernel, and the thread index is set to idx, corresponding to the distance index. According to the kernel configuration, the idx index is determined by the thread X-direction offset, the block X-direction offset, and the size of the block. The kernel function idx index is calculated as idx=blockIdx.x*blockDim.x+threadIdx.x, where blockIdx.x corresponds to the index of each thread block in Init_Grd_Slt_yblocks.x, blockDim.x corresponds to the dimension corresponding to each thread block in Init_Grd_Slt_yblocks.x, and threadIdx.x corresponds to the thread bundle index in the thread block of each dimension in Init_Grd_Slt_yblocks.x. The number of thread bundles can be a multiple of 16, and the index range is [0, 2*Hf_rg]. The above index is used to traverse the variable address space in the GPU video memory, and the array elements of the array allocated for the GPU video memory are assigned values ​​and data is calculated.

[0128] Function is completed Figure 6 , which is the azimuth division module of the ground grid in the Y direction shown in the specific operation flow diagram of BP imaging. The array variables allocated to this kernel function Init_Grd_Slt_y are Grd_Slt, Grd_y, Sqrt_temp, Hf_rg, Pix_rg, and H. The specific meanings of each parameter are as follows: Grd_Slt represents the slant range plane grid, Grd_y represents the range grid, and the array space allocated to Grd_Slt and Grd_y is sizeof(double)*2*Hf_rg; Hf_rg represents the number of range grid points, Pix_rg represents the range resolution, and H represents the height of the ground radar. The ground grid division is completed through the kernel function Init_Grdx and the kernel function Init_Grd_Slt_y.

[0129] The kernel7 kernel function name is Init_SenPos, the configuration thread in the block is Init_SenPosThread(512,1), and the configuration block in the grid is The meaning is to create a size of The thread grid is a thread block, where the unit of the thread grid is a thread block. 512*1 threads are configured in the block. The block configuration can be automatically adjusted according to the thread configuration. The schematic diagram is shown in Figure 9(b), which is a thread allocation diagram of kernel functions Kernel1-Kernel8. A thread index is established in the kernel, and the thread index is set to idx, corresponding to the distance index. According to the kernel configuration, the idx index is determined by the thread X-direction offset, the block X-direction offset, and the size of the block. The kernel function idx index is calculated as idx=blockIdx.x*blockDim.x+threadIdx.x, where blockIdx.x corresponds to the index of each thread block in Init_SenPos.x, blockDim.x corresponds to the dimension corresponding to each thread block in Init_SenPos.x, and threadIdx.x corresponds to the thread bundle index in the thread block of each dimension in Init_SenPos.x. The number of thread bundles can be a multiple of 16, and the index range is [0, 2*len]. Use the above index to traverse the variable address space in the GPU video memory, and assign values ​​and calculate data for the array elements of the array allocated for the GPU video memory.

[0130] Function is completed Figure 6 , which is the selection module of the effective area of ​​the starting radar position shown in the specific operation flow diagram of BP imaging. The array variables allocated to this kernel function are SensPos, sen_sor_pos, StaEchoAz, len, and Na respectively; the space allocated to sensPos and sensor_pos are both sizeof(double)*3*len, where SensPos and sen_sor_pos are used to represent the position information of the radar scanning at each moment, StaEchoAz is the effective start of the data in azimuth, len is the effective length of the selected azimuth, and Na is the azimuth length of the echo data. The generation of the effective imaging coordinate system is completed through this kernel function.

[0131] The kernel8 kernel function name is Init_AzSE, the configuration thread in the block is Init_AzSEThread(512,1), and the configuration block in the grid is The block configuration can be automatically adjusted according to the thread configuration. The schematic diagram is shown in FIG9(b), which is a schematic diagram of thread allocation for kernel functions Kernel1-Kernel8. A thread index is established in the kernel, and the thread index is set to idx, corresponding to the distance index. According to the kernel configuration, the idx index is determined by the thread X-direction offset, the block X-direction offset, and the size of the block. The kernel function idx index calculation method is idx = blockIdx.x * blockDim.x + threadIdx.x, where blockIdx.x corresponds to the index of each thread block in Init_AzSEblocks.x, blockDim.x corresponds to the dimension corresponding to each thread block in Init_AzSEblocks.x, and threadIdx.x corresponds to the thread bundle index in each dimension thread block in Init_AzSEblocks.x. The number of thread bundles can be a multiple of 16, and the index range is [0, 2*len]. Use the above index to traverse the variable address space in the GPU video memory, and assign values ​​and data calculations to the array elements of the array opened for the GPU video memory.

[0132] Function is completed Figure 6 , which is the effective aperture selection module shown in the specific operation flow diagram of BP imaging. The array variables allocated to the kernel function Init_AzSE are Apt_StaAz, Apt_EndAz, SensPos, Rc, Ant_Squint, La_hf, and len; len is the selected effective length in azimuth, Apt_StaAz and Apt_EndAz represent the starting aperture and the ending aperture respectively; SensPos represents the position information at the time of radar scanning, and the space allocated by SensPos is sizeof(doule)*3*len, Ant_Squint represents the radar squint angle, La_hf represents half of the length of the synthetic aperture antenna, and Rc represents the distance from the center of the scene.

[0133] The selection of effective aperture is completed through the kernel function Init_SenPos and the kernel function Init_AzSE.

[0134] The last and most critical step is to complete Figure 6 , which is the BP imaging part of the GPU device side shown in the specific operation flow diagram of BP imaging. The kernel function name of Kernel9 is ProcessPoint, the thread configured in the block is ProcessPointThread(512,1,1), and the block configured in the grid is , which means to create a A thread grid, where the unit of the thread grid is a thread block, and 512*1*1 threads are configured in the block; the configuration of the block can be automatically adjusted according to the configuration of the thread, as shown in Figure 9(c), which is a schematic diagram of thread allocation of the kernel function Kerne9. Establish thread index in the kernel, set thread index to idx, idy, idz, according to the kernel configuration, each thread index is determined by thread direction offset, block direction offset and block size; kernel function idx index calculation method is idx = blockIdx.x * blockDim.x + threadIdx.x, idy = blockIdx.y, idz = blockIdx.z + offset_Na, index range is [0, 2 * len], len is the effective length selected in azimuth, among which blockIdx.x, blockIdx.y, blockIdx.z correspond to thread block indexes of different dimensions in ProcessPointblocks.x, ProcessPointblocks.y, ProcessPointblocks.z, blockDim.x, blockDim.y correspond to dimensions corresponding to thread blocks in ProcessPointblocks.x, ProcessPointblocks.y, threadIdx.x, threadIdx.y correspond to thread bundle indexes in thread blocks of different dimensions in ProcessPointblocks.x, ProcessPointblocks.y. Use the above index to traverse the variable address space in the GPU video memory, assign values ​​to array elements and perform data calculations for the arrays allocated by the GPU video memory.

[0135] Its function is to realize the sinc interpolation (upsampling) of radar echo data, complete the calculation of instantaneous slant range between radar and target, complete the range phase compensation at the same time, and finally complete BP imaging.

[0136] Analyze the SAR image BP imaging process, clarify the relationship between each task, and divide the tasks according to their dependency and independence. Dependency means that there is a causal relationship between two tasks, and some or all of the data can be used interchangeably. Independence means that exchanging the processing order of two tasks will not have any effect on the results.

[0137] The radar echo data processed by the BP imaging is read from the GPU device to the CPU host, and the obtained data is written into a .data type file on the CPU, and read and displayed in the matlab software, as shown in FIG11(a), which is a radar echo signal obtained by the spaceborne SAR in the present invention. The image obtained by processing the echo signal is shown in FIG11(b), which is an image obtained by processing the radar echo signal in the present invention.

[0138] Compared with the CPU host side serial processing of radar echo data, when the GPU device side processes radar echo data in parallel, the GPU device side and the CPU host side do not share memory, and the GPU is not suitable for directly reading a large amount of CPU memory data, so it is necessary to transfer the radar echo data to the GPU device side memory through the CPU host side. In the case of multiple GPU devices, the simulation parameters need to be transferred from the CPU host side to the global memory in the GPU device side as needed. In the process of radar echo data calculation, combined with the characteristics of GPU, the GPU kernel function is called and a large number of device-side threads are assigned to the kernel function. Each thread corresponds to the radar echo data of each radar target point at a certain radar scanning moment. These threads can be calculated in parallel inside the GPU kernel function to complete the parallel processing of a large amount of data. In the process of processing SAR echo data on the GPU device side, in order to prevent memory conflicts on the GPU device side, the CPU host side is additionally configured with a kernel function to call multiple threads to complete related calculations on the GPU device side.

[0139] Simulation effect comparison: Fig.10 , which is the imaging result of the measured data simulation diagram without using the real-time processing method of spaceborne SAR imaging based on multi-server and multi-GPU of the present invention, is compared with Figure 11(b), which is the image obtained by processing the radar echo signal in the present invention. For the simulation of SAR radar echo data with the same number of points, serial BP imaging takes 5434.18s, and multi-server and multi-GPU takes 4s, with an acceleration ratio of 1358.5 times, effectively reducing the simulation time.

[0140] Although the present invention has been described in detail in general terms and in specific embodiments in this specification, it is obvious to those skilled in the art that some modifications or improvements may be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all fall within the scope of protection claimed by the present invention.

Claims

1. A real-time processing method for spaceborne SAR imaging based on multiple servers and multiple GPUs, characterized in that: The specific steps include: Step 1: read the satellite-borne SAR radar echo signal data on any server CPU host terminal, and divide the radar echo signal data into multiple server CPU host terminals by using the non-confidential communication between multiple server CPU host terminals; Step 2: read the corresponding radar echo signal data parameters and the corresponding multiple GPU device end information on each server CPU host end, and set the number of threads on the server CPU host end; Step 3, each GPU device end reads the spaceborne SAR radar echo signal data divided for it in azimuth direction and the allocated memory of the GPU device end from its corresponding CPU host end; Step 4, each GPU device end receives the complex echo of the radar echo signal transmitted from the corresponding server CPU host end; Step 5, each GPU device implements pulse compression of the complex echo in the range direction; Step 6, implementing BP imaging on the GPU device controlled by each server CPU host; Step 7, obtain the BP imaging on all GPU device ends corresponding to all server CPU host ends, and write the radar echo data processing file, use MATLAB to read the processed radar echo signal data and draw a graph based on the processed radar echo signal data, and analyze the imaging results; In step 6, the pulse compression of the spaceborne SAR radar echo data in the range direction and the parameters required for BP imaging are analyzed during the BP imaging process, the upsampling of the echo pulse is realized by interpolation, the dependencies before and after BP imaging processing are analyzed, and the operation process with data dependency and large for loop volume is accelerated by multi-threading on the CPU host side; on the contrary, the operation process without data dependency and large loop volume is accelerated by using CUDA on the GPU device side: Specifically, before BP imaging, sinc interpolation is used to achieve upsampling of echo pulses. The CPU host distributes the calculation results of various parameters and the upsampled echo pulses to different GPU device ends. The GPU device ends repeatedly perform projection and accumulation to achieve BP imaging. In addition, for operations without data dependency in BP imaging and parameter calculation before BP imaging, the following kernel functions are used on the GPU device side to implement them; Kernel1: GnrEcho: If the spaceborne SAR radar echo signal data is in the form of real and imaginary parts separated, this kernel function is used to realize the combination of the real and imaginary parts of the spaceborne SAR radar echo signal data; Kernel2: Pul_Press: For the radar echo signal data that has undergone range Fourier transform, multiply it by a matched filter to achieve range pulse compression of the radar echo signal data; Kernel3: InitSensorPos: Calculate the radar position information and build the coordinate system of the radar and the target; Kernel4, Init_Sig_stav: Select the starting position and the effective area of ​​the radar position; Kernel5, Kernel6: Init_Grdx and Init_Grd_Slt_y: divide the ground grid; Kernel7, Kernel8: Init_Senpos and Init_AzSE: Select the effective aperture; Kernel9: ProcessPoint: Complete the sinc interpolation of the echo signal data to achieve upsampling; complete the calculation of the radar antenna center phase and the target instantaneous slant range; complete the range phase compensation at the same time; and finally complete BP imaging; If the data processed by Kernel 1, Kernel 2, Kernel 3, and Kernel 4 have data dependencies, they are first assigned to the GPU device and run sequentially through each kernel function; The input data of Kernel5 and Kernel6 are related to the data processed by the four kernel functions Kernel1, Kernel2, Kernel3, and Kernel4. After the four kernel functions Kernel1, Kernel2, Kernel3, and Kernel4 are operated, the operation results are placed on the GPU device side: Kernel5 and Kernel6 need to wait for the above kernel functions Kernel1-Kernel4 to complete the operation before performing the operation, and add blocking before the execution of Kernel5; Kernel 7 and Kernel 8 need to wait for Kernel 3 to complete before performing operations. Kernel 3, Kernel 7 and Kernel 8 are placed in the same workflow to minimize the time spent on data transmission between the GPU device and the CPU host. After completing the above kernel function operation, use Kernel9 to complete BP imaging; Taking into account the memory consumption and the overlapping calculations between the GPU devices, the data offset based on the azimuth priority storage is calculated, including the offset of rows and columns, to achieve parallel processing of multiple GPUs.

2. The method for real-time processing of spaceborne SAR imaging based on multiple servers and multiple GPUs according to claim 1, characterized in that: In the step 1, by utilizing the non-confidential communication between multiple server CPU host terminals, the radar echo signal data is divided into multiple server CPU host terminals, and the non-confidential communication between any server CPU host terminal and other server CPU host terminals is realized through MPI.

3. The real-time processing method for spaceborne SAR imaging based on multiple servers and multiple GPUs according to claim 2 is characterized in that: In the step 2, the corresponding information of each GPU device end read by each server CPU host end includes: graphics card model, device computing power, total global memory, upper and lower limits of the device's grid block thread division, and the number of distance points of the spaceborne SAR radar echo signal data to be processed; the server CPU host end sets the same number of host-side threads as the GPU device end according to the read GPU device end information, that is, one server CPU host-side thread controls one GPU device end, and the radar echo signal data processing task and parameter calculation task in the radar back-projection imaging BP algorithm are assigned to different CPU host-side threads through OpenMP to achieve task-level parallelism.

4. The real-time processing method for spaceborne SAR imaging based on multiple servers and multiple GPUs according to claim 3 is characterized in that: In step 3, the server CPU host reads the corresponding GPU device information, and according to the total global memory of the GPU device information, multiplies the total global memory of the GPU device information by 0.3 to set the total available GPU memory.

5. The method for real-time processing of spaceborne SAR imaging based on multiple servers and multiple GPUs according to claim 4, characterized in that: In the step 4, each server CPU host end performs data processing according to different types of received radar echo signal data. There are two situations when the radar echo signal data is transmitted to the server CPU host end, one is that the real part and the imaginary part are transmitted separately, and the other is that the complete complex signal is transmitted: if the radar echo signal is divided into the real part and the imaginary part and transmitted separately, the server CPU host end adaptively allocates memory on the GPU device end according to the size of the incoming space-borne SAR radar echo signal data, and transmits the real part and the imaginary part of the radar echo signal to the GPU device end respectively, and then uses the kernel function GnrEcho on the GPU device end to complete the splicing of the real part and the imaginary part of the radar echo signal on the GPU device end.

6. The method for real-time processing of spaceborne SAR imaging based on multiple servers and multiple GPUs according to claim 5, characterized in that: In step 5, the GPU device side calls the fast Fourier transform (FFT) related functions in the NVIDIA CUDA library, performs a range-oriented fast Fourier transform (FFT) on the complex echo data that has been read by the GPU device side, transforms the radar echo complex data into the range frequency domain corresponding to the azimuth time domain, and multiplies the radar echo signal data in the range frequency domain by a matched filter to achieve radar echo signal pulse compression: Specifically, based on the radar echo signal data division done in step 3, openMP is used on the server CPU host to implement multi-threaded control of the CPU, and multiple GPU devices are further controlled within the server CPU host thread to perform related parallel computing: (1) The cuFFT library function provided by cuda is called on the GPU device to perform a range fast Fourier transform (FFT) on the radar echo signal data that has been read from the server CPU host and has completed azimuth block division, and the echo signal is transformed into the range frequency domain to prepare for subsequent pulse compression; (2) According to the radar simulation parameters, matched filtering is performed on the echo signal data in the azimuth time domain and the range frequency domain, that is, a matched filter is generated in each range direction nrn, and the formula is exp(j*pi*f*f / Bp*Tp), where f=nrn / Nr*fr; where f is the range sampling frequency, Bp is the signal bandwidth, Tp is the pulse repetition interval, fr is the radar pulse frequency, and nrn is the index of the range direction Nr; (3) Finally, the radar echo data after the operation of step (1) is complex multiplied with the matched filter to complete the range pulse compression, and the kernel function Pul_press is used on the GPU device to realize the range pulse compression of the radar echo signal data.

Citation Information

Patent Citations

  • Method for accelerating FFT (Fast Fourier Transform) by using GPU (Graphic Processing Unit)

    CN102902657A

  • Method for generating echoes of circular synthetic aperture radar based on CPU-GPU heterogeneous computing

    CN103885040A