Digital down conversion method and apparatus, electronic device, and computer storage medium

By generating a pre-stored complex exponent value table during the GPU program initialization phase, the problems of phase truncation error in field-programmable gate arrays and repeated calculation of complex exponent values ​​in GPU high-bandwidth scenarios are solved, achieving more efficient digital down-conversion processing.

CN123163522APending Publication Date: 2026-11-24PLA PEOPLES LIBERATION ARMY OF CHINA STRATEGIC SUPPORT FORCE AEROSPACE ENG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611110828.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In existing technologies, digital downconversion methods in field-programmable gate arrays suffer from phase errors due to phase truncation, while GPU-based implementations in high-bandwidth scenarios suffer from the problem of excessive repetitive computation of complex exponent values.

Method used

During the GPU program initialization phase, a pre-stored complex index value table is generated. The table length is the preset length of the data block and includes the in-phase and quadrature path data values ​​corresponding to the indexes of each GPU thread. During the real-time processing phase, the digital downconversion value is calculated by reading the pre-stored table.

Benefits of technology

This reduces the repetitive calculation of complex exponent values ​​in the real-time processing stage of digital downconversion, improves the real-time performance of the processing, and reduces the phase error introduced by phase truncation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123163522A_ABST
    Figure CN123163522A_ABST
Patent Text Reader

Abstract

This invention provides a digital down-conversion method, apparatus, electronic device, and computer storage medium. During the GPU program initialization phase, a pre-stored complex exponent value table is generated based on the sampling rate and local oscillator frequency of the input signal. The table length is a preset length for the data block, and it includes in-phase and quadrature data values ​​corresponding to the indices of each GPU thread. Subsequently, during the real-time digital down-conversion processing phase, each data block to be processed is sequentially acquired according to its preset length. For any data block, the in-phase and quadrature data values ​​at the same index in the same pre-stored complex exponent value table can be read according to the index of the data point to be processed within the data block. This effectively reduces the redundant calculation of complex exponent values ​​during the real-time digital down-conversion processing phase, thus improving the real-time performance of the digital down-conversion processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a digital down-conversion method, apparatus, electronic device, and computer storage medium. Background Technology

[0002] Digital down-conversion is a fundamental processing step in communication reception, aerospace telemetry and control, and broadband signal processing. It is used to shift the target frequency component of the input signal to the baseband or a lower intermediate frequency position. During digital down-conversion, a digital local oscillator signal corresponding to the input signal data needs to be generated, and the input signal data and the digital local oscillator signal are then mixed. Therefore, the method of generating the digital local oscillator signal affects the accuracy and real-time performance of the digital down-conversion process.

[0003] In existing digital downconversion implementations based on field-programmable gate arrays (FPGAs), digital local oscillator signals are typically generated using phase accumulators and sine lookup tables. However, due to the limited on-chip storage space of FPGAs, the length of the sine lookup table is restricted, and the phase values ​​usually need to be truncated before the lookup, thus introducing phase errors.

[0004] In existing GPU-based digital downconversion implementations, the GPU thread can calculate the complex exponent value corresponding to each data point in real time based on the sampling rate, local oscillator frequency, and data point index of the input signal. While this method avoids the phase truncation problem, in high-bandwidth scenarios, the complex exponent value calculation needs to be performed for each data point during the real-time processing stage, resulting in a large amount of redundant complex exponent value calculations. Summary of the Invention

[0005] In view of this, the present invention provides a digital downconversion method, apparatus, electronic device and computer storage medium, which avoids the phase error caused by phase truncation in the prior art, while reducing the repeated calculation of complex exponent values ​​in the real-time processing stage.

[0006] The first aspect of this invention provides a digital down-conversion method, comprising:

[0007] During the GPU program initialization phase, a pre-stored complex exponent value table is generated based on the sampling rate and local oscillator frequency of the input signal; wherein, the table length of the pre-stored complex exponent value table is the preset length of the data block, and the pre-stored complex exponent value table includes the in-phase path data value and quadrature path data value corresponding to the index of each GPU thread;

[0008] During the real-time processing stage of digital down-conversion, each data block to be processed is acquired sequentially according to the preset length of the data block;

[0009] For any data point to be processed in any data block to be processed, the target in-phase path data value and the target orthogonal path data value are read from the pre-stored complex index value table based on the index of the data point to be processed.

[0010] Based on the target in-phase path data value, the target orthogonal path data value, and the input signal data value corresponding to the data point to be processed, the digital down-conversion value of the data point to be processed is determined.

[0011] Optionally, before generating the pre-stored complex exponent value table based on the sampling rate and local oscillator frequency of the input signal during the GPU program initialization phase, the method further includes:

[0012] The application requests host memory and GPU device memory for storing data blocks to be processed, and GPU device memory for storing the pre-stored complex index value table;

[0013] The data in the host memory and the GPU device memory are initialized.

[0014] Optionally, generating a pre-stored complex exponent value table based on the sampling rate and local oscillator frequency of the input signal includes:

[0015] For any of the GPU threads, the phase value corresponding to the index of the GPU thread is calculated based on the index of the GPU thread, the sampling rate of the input signal, and the local oscillator frequency.

[0016] Based on the phase value corresponding to the index of the GPU thread, generate the in-phase path data value and the quadrature path data value corresponding to the index of the GPU thread.

[0017] Optionally, generating the in-phase path data value and quadrature path data value corresponding to the index of the GPU thread based on the phase value corresponding to the index of the GPU thread includes:

[0018] Perform a cosine operation on the phase value corresponding to the index of the GPU thread to obtain the in-phase path data value corresponding to the index of the GPU thread;

[0019] Perform a sine operation on the phase value corresponding to the index of the GPU thread and take its opposite to obtain the orthogonal path data value corresponding to the index of the GPU thread.

[0020] Optionally, in the real-time processing stage of digital down-conversion, each data block to be processed is acquired sequentially according to the preset length of the data block, including:

[0021] Determine if the current host memory data is readable;

[0022] If it is determined that the current host memory data is readable, then the data in the input signal data stream is read from the host memory according to the preset length of the data block to obtain the data block to be processed.

[0023] Optionally, determining the digital down-conversion value of the data point to be processed based on the target in-phase path data value, the target quadrature path data value, and the input signal data value corresponding to the data point to be processed includes:

[0024] Multiply the target in-phase path data value by the input signal data value corresponding to the data point to be processed to obtain the in-phase path frequency conversion value;

[0025] The orthogonal path data value is multiplied by the input signal data value corresponding to the data point to be processed to obtain the orthogonal path frequency conversion value.

[0026] Optionally, after determining the digital down-conversion value of the data point to be processed based on the target in-phase path data value, the target quadrature path data value, and the input signal data value corresponding to the data point to be processed, the method further includes:

[0027] The digital downconversion value of the data point to be processed is transferred from the GPU device memory to the host memory.

[0028] A second aspect of the present invention provides a digital down-conversion device, comprising:

[0029] A pre-stored complex exponent value table generation unit is used to generate a pre-stored complex exponent value table based on the sampling rate and local oscillator frequency of the input signal during the GPU program initialization phase; wherein, the table length of the pre-stored complex exponent value table is a preset length of the data block, and the pre-stored complex exponent value table includes the in-phase path data value and quadrature path data value corresponding to the index of each GPU thread;

[0030] The data block acquisition unit is used to acquire each data block to be processed sequentially according to the preset length of the data block during the real-time processing stage of digital down-conversion;

[0031] The reading unit is used to read the target in-phase path data value and the target orthogonal path data value from the pre-stored complex index value table for any data point to be processed in any data block to be processed, based on the index of the data point to be processed.

[0032] The frequency conversion value determination unit is used to determine the digital down-conversion value of the data point to be processed based on the target in-phase path data value, the target quadrature path data value, and the input signal data value corresponding to the data point to be processed.

[0033] Optionally, the digital down-converter further includes:

[0034] The memory allocation unit is used to allocate host memory and GPU device memory for storing data blocks to be processed, and GPU device memory for storing the pre-stored complex index value table;

[0035] An initialization unit is used to initialize the data in the host memory and the GPU device memory.

[0036] Optionally, the pre-stored complex index value table generation unit includes:

[0037] The phase value calculation unit is used to calculate the phase value corresponding to the index of the GPU thread for any GPU thread, based on the index of the GPU thread, the sampling rate of the input signal and the local oscillator frequency.

[0038] The in-phase path data value and quadrature path data value generation unit is used to generate in-phase path data values ​​and quadrature path data values ​​corresponding to the index of the GPU thread based on the phase value corresponding to the index of the GPU thread.

[0039] Optionally, the in-phase path data value and orthogonal path data value generation unit includes:

[0040] The in-phase path data value calculation unit is used to perform a cosine operation on the phase value corresponding to the index of the GPU thread to obtain the in-phase path data value corresponding to the index of the GPU thread.

[0041] The orthogonal path data value calculation unit is used to perform a sine operation on the phase value corresponding to the index of the GPU thread and take the opposite number to obtain the orthogonal path data value corresponding to the index of the GPU thread.

[0042] Optionally, the data block acquisition unit includes:

[0043] The judgment unit is used to determine whether the current host memory data is readable.

[0044] The reading subunit is used to read data from the input signal data stream from the host memory according to the preset length of the data block if the judgment unit determines that the current host memory data is readable, so as to obtain the data block to be processed.

[0045] Optionally, the frequency conversion value determination unit includes:

[0046] The in-phase path frequency conversion value calculation unit is used to multiply the target in-phase path data value with the input signal data value corresponding to the data point to be processed to obtain the in-phase path frequency conversion value;

[0047] The orthogonal path frequency conversion value calculation unit is used to multiply the target orthogonal path data value with the input signal data value corresponding to the data point to be processed to obtain the orthogonal path frequency conversion value.

[0048] Optionally, the digital down-converter further includes:

[0049] A transmission unit is used to transfer the digital down-conversion value of the data point to be processed from the GPU device memory to the host memory.

[0050] A third aspect of the present invention provides an electronic device, comprising:

[0051] One or more processors;

[0052] A storage device on which one or more programs are stored;

[0053] When the one or more programs are executed by the one or more processors, the one or more processors implement the digital down-conversion method as described in any one of the first aspects.

[0054] A fourth aspect of the present invention provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the digital down-conversion method as described in any one of the first aspects.

[0055] As can be seen from the above scheme, the present invention provides a digital down-conversion method, apparatus, electronic device, and computer storage medium. During the GPU program initialization phase, a pre-stored complex exponent value table is generated based on the sampling rate and local oscillator frequency of the input signal. The table length is a preset length of the data block, and the table includes the in-phase and quadrature data values ​​corresponding to the indices of each GPU thread. Subsequently, during the real-time digital down-conversion processing phase, after sequentially acquiring each data block to be processed according to the preset data block length, for any given data block, the in-phase and quadrature data values ​​at the same index in the same pre-stored complex exponent value table can be read according to the index of the data point to be processed in the data block. In other words, the present invention moves the calculation of complex exponent values ​​from the real-time digital down-conversion processing phase to the GPU program initialization phase, reducing the repetitive calculation of complex exponent values ​​during the real-time digital down-conversion processing phase and improving the real-time performance of digital down-conversion processing. Simultaneously, the present invention eliminates the need for the phase truncation lookup method in field-programmable gate arrays, which is limited by on-chip storage space, thus reducing the phase error introduced by phase truncation. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0057] Figure 1 A flowchart of a digital downconversion method provided in an embodiment of the present invention;

[0058] Figure 2 A schematic diagram illustrating the generation of a pre-stored complex index value table, provided for another embodiment of the present invention;

[0059] Figure 3 A flowchart of a real-time processing stage for digital downconversion is provided in another embodiment of the present invention;

[0060] Figure 4 A flowchart of a digital downconversion method provided in another embodiment of the present invention;

[0061] Figure 5 This is a schematic diagram of a digital downconverter device provided in another embodiment of the present invention. Detailed Implementation

[0062] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0063] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0064] It should be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this invention are all information and data authorized by the user or fully authorized by all parties.

[0065] It should be noted that the concepts of "first" and "second" mentioned in this invention are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0066] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0067] This invention provides a digital down-conversion method, such as... Figure 1 As shown, the specific steps include:

[0068] S101. During the GPU program initialization phase, a pre-stored complex exponent value table is generated based on the sampling rate and local oscillator frequency of the input signal.

[0069] The pre-stored complex exponent value table has a length equal to the preset length of the data block. This table includes the in-phase (I-path) and quadrature (Q-path) data values ​​corresponding to the indices of each GPU thread. The preset length of the data block is an integer multiple of the number of sampling points corresponding to the local oscillator frequency period.

[0070] The input signal refers to the discrete sampled signal to be processed by digital down-conversion. The sampling rate of the input signal refers to the number of sampled points of the input signal per unit time. The local oscillator frequency refers to the local oscillation frequency used for frequency shifting in digital down-conversion processing. The preset data block length refers to the number of input signal data points loaded and processed in a single operation during the real-time processing phase.

[0071] In practical applications of this invention, the preset length of the data block can be set to an integer multiple of the number of sampling points corresponding to the local oscillator frequency period. Thus, under the current sampling rate and local oscillator frequency conditions, a data block contains an integer number of sampling points corresponding to the local oscillator period, allowing the complex exponential phase distribution within a data block to cover an integer number of local oscillator periods. Consequently, in the subsequent digital down-conversion real-time processing stage, multiple data blocks can repeatedly read the same pre-stored complex exponential value table according to the same data point index, eliminating the need to recalculate the complex exponential value for each data block.

[0072] In this embodiment, the pre-stored complex index value table refers to a data table used to store the local oscillator complex index values ​​required for digital down-conversion. One entry in the pre-stored complex index value table corresponds to a data point index in a data block.

[0073] In the practical application of this invention, during the GPU program initialization phase, the GPU kernel function can be enabled to generate a pre-stored complex exponent value table based on the sampling rate and local oscillator frequency of the input signal.

[0074] In this context, GPU kernel functions refer to parallel computing functions executed on the GPU device. GPU kernel functions can allocate different GPU threads to the indices of different data points in a pre-stored complex exponential value table, allowing multiple GPU threads to compute in-phase and orthogonal path data values ​​at multiple index positions in parallel. In this way, the generation process of the pre-stored complex exponential value table can be completed using the GPU's parallel computing capabilities, effectively improving the generation speed of the pre-stored complex exponential value table.

[0075] Furthermore, the generated pre-stored complex index value table can be saved in the GPU device memory for direct reading in subsequent real-time processing stages, further improving the processing efficiency of the real-time processing stage.

[0076] Optionally, in another embodiment of the present invention, the size of the Block Pergrid (BPG) can be determined based on the GPU thread block dimension, the number of GPU threads in each GPU thread block, and the preset length of the data block, and the GPU kernel function for calculating the pre-stored complex exponential value table can be started based on the size of the thread pergrid. This is not limited here.

[0077] For example: if the preset length of the data block is M, the GPU thread block is one-dimensional, and the number of threads per block (TPB) is 256, then the thread grid size (BPG) is [value missing]. , This indicates rounding up to the nearest integer.

[0078] The threaded grid is loaded in a loop, ensuring that each thread processes the phase calculation, phase accumulation, and trigonometric function calculation of one piece of data.

[0079] In practical applications of this invention, the determination of the index of each GPU thread recorded in the pre-stored complex index value table can be based on the identifier of the block to which the GPU thread belongs and the index of the GPU thread in that block. For example, assuming that the data point is processed by the GPU thread in the i-th block (0≤i≤BPG-1), each block contains TPBs of threads, and the index of the GPU thread in the block is k, then the index of the GPU thread... And when When this happens, the thread does not need to perform calculations and exits directly.

[0080] Optionally, in another embodiment of the present invention, before performing step S101, the following may also be included:

[0081] Allocate host memory and GPU device memory for storing data blocks to be processed, and GPU device memory for storing pre-stored complex exponent value tables; initialize the data in host memory and GPU device memory.

[0082] In the practical application of this invention, host memory and device memory can be requested by using, but not limited to, device memory allocation functions (cudaMallocHost, cudaMalloc), and no limitation is made here.

[0083] In this embodiment, host memory refers to the memory space accessible on the CPU side, used to receive or cache input signal data, and to receive digital down-conversion results transmitted back from GPU device memory. Device memory refers to the memory space accessible on the GPU side, used to store input signal data, pre-store complex exponent value tables, and digital down-conversion results processed by the GPU.

[0084] Optionally, in one embodiment of the present invention, the host memory allocation length of the data block is M, the device memory allocation length of the data block is M, the device memory allocation length of the in-phase path data values ​​in the pre-stored complex exponent value table is M, and the device memory allocation length of the orthogonal path data values ​​in the pre-stored complex exponent value table is M.

[0085] Optionally, in another embodiment of the present invention, one implementation of step S101 includes the following steps (steps A1 to A2):

[0086] Step A1: For any GPU thread, calculate the phase value corresponding to the index of the GPU thread based on the index of the GPU thread, the sampling rate of the input signal, and the local oscillator frequency.

[0087] In the practical application of this invention, the specific implementation method for calculating the phase value corresponding to the GPU thread index based on the GPU thread index, the sampling rate of the input signal, and the local oscillator frequency can adopt the following formula:

[0088] ;

[0089] in, This refers to the phase value corresponding to index n of the GPU thread. Sampling rate, This is the local oscillator frequency.

[0090] Step A2: Based on the phase value corresponding to the index of the GPU thread, generate the in-phase path data value and the quadrature path data value corresponding to the index of the GPU thread.

[0091] In the practical application of this invention, trigonometric functions can be used, but are not limited to, to calculate the phase value, thereby obtaining the in-phase path data value and the quadrature path data value corresponding to the index of the GPU thread.

[0092] Optionally, in another embodiment of the present invention, one implementation of step A2 includes the following steps (steps A21 to A22):

[0093] Step A21: Perform a cosine operation on the phase value corresponding to the index of the GPU thread to obtain the in-phase path data value corresponding to the index of the GPU thread.

[0094] Step A22: Perform a sine operation on the phase value corresponding to the index of the GPU thread and take the opposite number to obtain the orthogonal path data value corresponding to the index of the GPU thread.

[0095] Optionally, in another embodiment of the present invention, separate storage areas may be allocated for the in-phase path data values ​​and the quadrature path data values, that is, the in-phase path data values ​​are stored in the in-phase path storage area of ​​the pre-stored complex exponent value table, and the quadrature path data values ​​are stored in the quadrature path storage area of ​​the pre-stored complex exponent value table. This is not limited here.

[0096] Therefore, during the GPU program initialization phase, separate device memory can be allocated for storing orthogonal path data values ​​and for storing in-phase path data values. Since both in-phase and orthogonal path data values ​​need to be read by the GPU thread during digital downconversion processing, storing them in GPU device memory can reduce data interaction between the host and device during real-time processing.

[0097] In practical applications of this invention, the number of GPU threads used for parallel computation of the pre-stored complex exponential value table can also be set. If the number of GPU threads is less than the data block length, each GPU thread can compute the in-phase (I-path) and quadrature (Q-path) data values ​​corresponding to the GPU thread index in one or more pre-stored complex exponential value tables according to the thread stepping method.

[0098] like Figure 2 The diagram illustrates a method for pre-generating a pre-stored complex exponential value table during the GPU program initialization phase, as provided in an embodiment of the present invention. The data block has a length of M and includes multiple blocks. Each block contains a number of threads (TPB). For each thread, the I-path data value and Q-path data value corresponding to the index of the data point processed by the thread are calculated. The I-path data value is stored in the in-phase storage area of ​​the pre-stored complex exponential value table, and the Q-path data value is stored in the orthogonal storage area of ​​the pre-stored complex exponential value table. The length of the pre-stored complex exponential value table is the length M of the data block.

[0099] S102. In the real-time processing stage of digital down-conversion, each data block to be processed is obtained sequentially according to the preset length of the data block.

[0100] In this embodiment, the real-time digital down-conversion processing stage refers to the stage in which the continuously arriving input signal data is loaded in blocks and processed by frequency conversion after the pre-stored complex exponential value table has been pre-calculated and stored.

[0101] It should be emphasized that in the real-time processing stage of digital downconversion in this embodiment, trigonometric function calculations are no longer performed on each data point in real time. Instead, the corresponding in-phase and quadrature data values ​​are read from the pre-stored complex index table according to the data point index, and then the digital downconversion value of the data point is determined by comparing it with the input signal data value corresponding to the data point.

[0102] Optionally, in another embodiment of the present invention, one implementation of step S102 includes:

[0103] If the current host memory data is readable, then the data in the input signal data stream is read from the host memory according to the preset length of the data block to obtain the data block to be processed.

[0104] In this embodiment, whether the host memory data is readable refers to whether the amount of input signal data in the host memory has reached the preset length of the data block. If the host memory data is not readable, the system can continue to wait or poll. If the host memory data is readable, data from the input signal data stream can be read from the host memory according to the preset length of the data block to obtain the current data block to be processed.

[0105] In the actual application of this invention, it is also necessary to transfer the data block to be processed from the host memory to the GPU device memory. Specifically, cudaMemcpyHostToDevice can be used, but is not limited to, to transfer the data block to be processed from the host memory to the GPU device memory.

[0106] In the actual application of this invention, after the transmission is completed, the GPU kernel function used to calculate the digital down-conversion result can be started, so that the GPU thread can perform table lookup and multiplication on the current data block to be processed.

[0107] S103. For any data point to be processed in any data block to be processed, the target in-phase path data value and the target orthogonal path data value are read from the pre-stored complex index value table based on the index of the data point to be processed.

[0108] It should be noted that the data point index to be processed in this invention refers to the local index of the data point to be processed in its respective data block to be processed, rather than the global index in the continuous input signal data.

[0109] Since the preset length of the data block is an integer multiple of the number of sampling points corresponding to the local oscillator frequency period, and the length of the pre-stored complex exponent value table is consistent with the preset length of the data block, any data block can establish a correspondence between its internal data points and the pre-stored complex exponent value table according to the local index of its data points. That is, the data point in the data block with the first local index reads the in-phase path storage value and the quadrature path storage value at the same first index in the pre-stored complex exponent value table.

[0110] Through the above index correspondence, the GPU thread does not need to recalculate the local oscillator phase based on the global data point sequence number during the real-time processing stage, nor does it need to perform sine or cosine function operations in real time.

[0111] Specifically, if the index of the data point to be processed is the target index, then the in-phase path data value and the orthogonal path data value corresponding to the target index are read from the pre-stored complex index value table and used as the target in-phase path data value and the target orthogonal path data value.

[0112] S104. Based on the target in-phase path data value, the target quadrature path data value, and the input signal data value corresponding to the data point to be processed, determine the digital down-conversion value of the data point to be processed.

[0113] The digital downconversion value can include the in-phase path frequency conversion value and the quadrature path frequency conversion value.

[0114] Optionally, in another embodiment of the present invention, one implementation of step S104 specifically includes (step B1-step B2):

[0115] Step B1: Multiply the target in-phase path data value with the input signal data value corresponding to the data point to be processed to obtain the in-phase path frequency conversion value.

[0116] Step B2: Multiply the target orthogonal path data value with the input signal data value corresponding to the data point to be processed to obtain the orthogonal path frequency conversion value.

[0117] Optionally, in another embodiment of the present invention, after determining the digital down-conversion value of the data point to be processed, one implementation of the digital down-conversion method further includes:

[0118] The digital downconversion values ​​of the data points to be processed are transferred from the GPU device memory to the host memory.

[0119] In practical applications of this invention, cudaMemcpyDeviceToHost can be used, but is not limited to, to transfer the digital downconversion result corresponding to the data block from the GPU device memory to the host memory.

[0120] Optionally, in another embodiment of the present invention, one implementation of the digital down-conversion method further includes:

[0121] Continuously determine whether the digital downconversion has ended.

[0122] Whether the digital downconversion has ended can be determined based on external control commands, whether the input signal data has ended, whether the processing time has reached the set value, or the system operating status; no specific limitation is made here.

[0123] Specifically, while the digital downconversion is not yet complete, the next data block to be processed is obtained according to the preset length of the data block, and the digital downconversion process is performed on the next data block to be processed based on the pre-stored complex index value table. When the digital downconversion is completed, the host memory and device memory used to store the input signal data are released, as well as the device memory used to store the in-phase path data value and the quadrature path data value.

[0124] In the practical application of this invention, host memory and device memory can be released by using, but not limited to, device memory allocation functions (cudaFreeHost, cudaFree), which are not limited here.

[0125] like Figure 3 The diagram shown illustrates a real-time processing stage of a digital down-conversion circuit according to an embodiment of the present invention. The length of the data block to be processed is M. The calculation of the input signal data value corresponding to each data point to be processed, as well as the target in-phase path data value and the target quadrature path data value obtained by reading the index of the data point to be processed from the pre-stored complex index value table, are all completed by a single thread. The single-threaded calculation method is as follows: Figure 3 As shown in the lower left corner, the in-phase path data value is obtained by multiplying the target in-phase path data value with the input signal data value corresponding to the data point to be processed, and the quadrature path frequency conversion value is obtained by multiplying the target quadrature path data value with the input signal data value corresponding to the data point to be processed.

[0126] To clearly illustrate the relationship between the CPU and GPU during the implementation of this invention, the embodiments of this invention provide a complete flow of the digital down-conversion method, such as... Figure 4 As shown:

[0127] (1) During the GPU program initialization phase, the host memory and device memory are first requested using the device memory allocation functions (cudaMallocHost, cudaMalloc), and then all memory data is initialized to 0. The host memory allocation length of the data block is M, the device memory allocation length of the data block is M, the device memory allocation length of the cos() value stored in the complex exponent table (i.e., the pre-stored complex exponent value table) is M, and the device memory allocation length of the -sin() value stored in the complex exponent table is M.

[0128] (2) Set up block and grid and enable the complex exponent table calculation kernel function. The GPU kernel function generates a pre-stored complex exponent value table based on the sampling rate and local oscillator frequency of the input signal (parallel calculation of the in-phase path data value and the quadrature path data value at each index position).

[0129] (3) Determine whether the host memory data is readable. If it is not readable, continue to wait. If it is readable, proceed to the next step.

[0130] (4) Use cudaMemcpyHostToDevice to transfer M-length data (the data block to be processed) from the host memory to the M-length data memory space in the GPU global memory.

[0131] (5) Set up block, grid and start kernel function. For any data point to be processed in any data block, read the target in-phase path data value and the target quadrature path data value from the pre-stored complex index value table based on the index of the data point to be processed, and calculate the digital down-conversion value of the data point to be processed in parallel based on the target in-phase path data value, the target quadrature path data value and the input signal data value corresponding to the data point to be processed.

[0132] (6) Use cudaMemcpyDeviceToHost to transfer the digital downconversion result corresponding to the data block from the GPU device memory to the host memory.

[0133] (7) Continuously determine whether the digital downconversion has ended. If the digital downconversion has not ended, continue to obtain the next data block to be processed according to the preset length of the data block, and perform digital downconversion processing on the next data block to be processed based on the pre-stored complex index value table. If the digital downconversion has ended, use the device memory allocation function (cudaFreeHost, cudaFree) to release the host memory and device memory.

[0134] Specifically, the CPU is used to receive input signal data, manage host memory, and schedule GPU tasks; the GPU is used to pre-calculate the complex exponent table and perform parallel processing of digital down-conversion.

[0135] As can be seen from the above scheme, this invention provides a digital down-conversion method. During the GPU program initialization phase, a pre-stored complex exponent value table is generated based on the sampling rate and local oscillator frequency of the input signal. The table length is a preset length for the data block, and it includes the in-phase and quadrature data values ​​corresponding to the indices of each GPU thread. Subsequently, during the real-time digital down-conversion processing phase, after sequentially acquiring each data block to be processed according to the preset data block length, for any data block to be processed, the in-phase and quadrature data values ​​at the same index in the same pre-stored complex exponent value table can be read according to the index of the data point to be processed in the data block. In other words, this invention moves the calculation of complex exponent values ​​from the real-time digital down-conversion processing phase to the GPU program initialization phase, reducing the repetitive calculation of complex exponent values ​​during the real-time digital down-conversion processing phase and improving the real-time performance of digital down-conversion processing. Simultaneously, this invention eliminates the need for the phase truncation lookup table method in field-programmable gate arrays, which is limited by on-chip storage space, thus reducing the phase error introduced by phase truncation.

[0136] Another embodiment of the present invention provides a digital down-conversion device, such as... Figure 5 As shown, it specifically includes:

[0137] The pre-stored complex exponent value table generation unit 501 is used to generate a pre-stored complex exponent value table based on the sampling rate and local oscillator frequency of the input signal during the GPU program initialization phase.

[0138] The pre-stored complex index value table has a table length that is the preset length of the data block. The pre-stored complex index value table includes the in-phase path data value and the orthogonal path data value corresponding to the index of each GPU thread.

[0139] Optionally, in another embodiment of the present invention, one implementation of the digital down-conversion device further includes:

[0140] The memory allocation unit is used to allocate host memory and GPU device memory for storing data blocks to be processed, as well as GPU device memory for storing pre-stored complex exponent value tables.

[0141] The initialization unit is used to initialize the data in the host memory and GPU device memory.

[0142] The specific working process of the units disclosed in the above embodiments of the present invention can be found in the corresponding method embodiments, and will not be repeated here.

[0143] Optionally, in another embodiment of the present invention, one implementation of the pre-stored complex index value table generation unit 501 includes:

[0144] The phase value calculation unit is used to calculate the phase value corresponding to the index of the GPU thread for any GPU thread, based on the index of the GPU thread, the sampling rate of the input signal, and the local oscillator frequency.

[0145] The in-phase path data value and quadrature path data value generation unit is used to generate in-phase path data values ​​and quadrature path data values ​​corresponding to the GPU thread index based on the phase value corresponding to the GPU thread index.

[0146] The specific working process of the units disclosed in the above embodiments of the present invention can be found in the corresponding method embodiments, and will not be repeated here.

[0147] Optionally, in another embodiment of the present invention, one implementation of the in-phase path data value and orthogonal path data value generation unit includes:

[0148] The in-phase path data value calculation unit is used to perform cosine operation on the phase value corresponding to the index of the GPU thread to obtain the in-phase path data value corresponding to the index of the GPU thread.

[0149] The orthogonal path data value calculation unit is used to perform a sine operation on the phase value corresponding to the index of the GPU thread and take the opposite number to obtain the orthogonal path data value corresponding to the index of the GPU thread.

[0150] The specific working process of the units disclosed in the above embodiments of the present invention can be found in the corresponding method embodiments, and will not be repeated here.

[0151] The data block acquisition unit 502 is used to acquire each data block to be processed sequentially according to the preset length of the data block during the real-time processing stage of digital down-conversion.

[0152] Optionally, in another embodiment of the present invention, one implementation of the data block acquisition unit 502 includes:

[0153] The judgment unit is used to determine whether the current host memory data is readable.

[0154] The reading subunit is used to read data from the input signal data stream from the host memory according to the preset length of the data block if the judgment unit determines that the current host memory data is readable, so as to obtain the data block to be processed.

[0155] The specific working process of the units disclosed in the above embodiments of the present invention can be found in the corresponding method embodiments, and will not be repeated here.

[0156] The reading unit 503 is used to read the target in-phase path data value and the target orthogonal path data value from the pre-stored complex index value table for any data point to be processed in any data block to be processed, based on the index of the data point to be processed.

[0157] The frequency conversion value determination unit 504 is used to determine the digital down-conversion value of the data point to be processed based on the target in-phase path data value, the target quadrature path data value and the input signal data value corresponding to the data point to be processed.

[0158] For details on the specific operation of the units disclosed in the above embodiments of the present invention, please refer to the corresponding method embodiments, such as... Figure 1 As shown, it will not be elaborated further here.

[0159] Optionally, in another embodiment of the present invention, one implementation of the frequency conversion value determination unit 504 includes:

[0160] The in-phase path frequency conversion value calculation unit is used to multiply the target in-phase path data value with the input signal data value corresponding to the data point to be processed to obtain the in-phase path frequency conversion value.

[0161] The orthogonal path frequency conversion value calculation unit is used to multiply the target orthogonal path data value with the input signal data value corresponding to the data point to be processed to obtain the orthogonal path frequency conversion value.

[0162] For details on the specific operation of the units disclosed in the above embodiments of the present invention, please refer to the corresponding method embodiments, such as... Figure 1 As shown, it will not be elaborated further here.

[0163] Optionally, in another embodiment of the present invention, one implementation of the digital down-conversion device further includes:

[0164] The transmission unit is used to transfer the digital down-conversion values ​​of the data points to be processed from the GPU device memory to the host memory.

[0165] The specific working process of the units disclosed in the above embodiments of the present invention can be found in the corresponding method embodiments, and will not be repeated here.

[0166] As can be seen from the above scheme, the present invention provides a digital down-conversion device that, during the GPU program initialization stage, generates a pre-stored complex exponent value table based on the sampling rate and local oscillator frequency of the input signal. The table length is a preset length of the data block, and it includes the in-phase and quadrature data values ​​corresponding to the indices of each GPU thread. Subsequently, during the real-time digital down-conversion processing stage, after sequentially acquiring each data block to be processed according to the preset data block length, for any data block to be processed, the in-phase and quadrature data values ​​at the same index in the same pre-stored complex exponent value table can be read according to the index of the data point to be processed in the data block. In other words, the present invention moves the calculation of complex exponent values ​​from the real-time digital down-conversion processing stage to the GPU program initialization stage, reducing the repetitive calculation of complex exponent values ​​during the real-time digital down-conversion processing stage and improving the real-time performance of digital down-conversion processing. Simultaneously, the present invention eliminates the need for the phase truncation lookup method in field-programmable gate arrays, which is limited by on-chip storage space, thus reducing the phase error introduced by phase truncation.

[0167] Another embodiment of the present invention provides an electronic device, comprising:

[0168] One or more processors.

[0169] A storage device on which one or more programs are stored.

[0170] When the one or more programs are executed by the one or more processors, the one or more processors implement the digital down-conversion method as described in the above embodiments.

[0171] Another embodiment of the present invention provides a computer storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the digital down-conversion method as described in the above embodiments.

[0172] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0173] It should be noted that the computer-readable medium described above in this invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0174] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0175] Another embodiment of the present invention provides a computer program product, which, when executed, is used to perform the above-described digital down-conversion method.

[0176] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, it performs the functions defined in the methods of the embodiments of the present invention.

[0177] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in this invention is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely exemplary forms for implementing the invention.

[0178] While several specific implementation details are included in the foregoing discussion, these should not be construed as limiting the scope of the invention. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0179] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention is not limited to the specific combination of the above-described technical features, but also includes other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above-described features with technical features of the present invention (but not limited to) that have similar functions.

Claims

1. A method of digital down conversion, characterized by, include: During the GPU program initialization phase, a pre-stored complex exponent value table is generated based on the sampling rate and local oscillator frequency of the input signal; wherein, the table length of the pre-stored complex exponent value table is the preset length of the data block, and the pre-stored complex exponent value table includes the in-phase path data value and quadrature path data value corresponding to the index of each GPU thread; During the real-time processing stage of digital down-conversion, each data block to be processed is acquired sequentially according to the preset length of the data block; For any data point to be processed in any data block to be processed, the target in-phase path data value and the target orthogonal path data value are read from the pre-stored complex index value table based on the index of the data point to be processed. Based on the target in-phase path data value, the target orthogonal path data value, and the input signal data value corresponding to the data point to be processed, the digital down-conversion value of the data point to be processed is determined.

2. The digital down conversion method of claim 1, wherein, Before generating the pre-stored complex exponent value table based on the sampling rate and local oscillator frequency of the input signal during the GPU program initialization phase, the process also includes: The application requests host memory and GPU device memory for storing data blocks to be processed, and GPU device memory for storing the pre-stored complex index value table; The data in the host memory and the GPU device memory are initialized.

3. The digital down-conversion method according to claim 1, characterized in that, The generation of a pre-stored complex exponent value table based on the sampling rate and local oscillator frequency of the input signal includes: For any of the GPU threads, the phase value corresponding to the index of the GPU thread is calculated based on the index of the GPU thread, the sampling rate of the input signal, and the local oscillator frequency. Based on the phase value corresponding to the index of the GPU thread, generate the in-phase path data value and the quadrature path data value corresponding to the index of the GPU thread.

4. The digital down-conversion method according to claim 3, characterized in that, The step of generating in-phase path data values ​​and quadrature path data values ​​corresponding to the index of the GPU thread based on the phase value of the index of the GPU thread includes: Perform a cosine operation on the phase value corresponding to the index of the GPU thread to obtain the in-phase path data value corresponding to the index of the GPU thread; Perform a sine operation on the phase value corresponding to the index of the GPU thread and take its opposite to obtain the orthogonal path data value corresponding to the index of the GPU thread.

5. The digital down-conversion method according to claim 1, characterized in that, In the real-time processing stage of digital down-conversion, each data block to be processed is acquired sequentially according to the preset length of the data block, including: Determine if the current host memory data is readable; If it is determined that the current host memory data is readable, then the data in the input signal data stream is read from the host memory according to the preset length of the data block to obtain the data block to be processed.

6. The digital down-conversion method according to claim 1, characterized in that, The step of determining the digital down-conversion value of the data point to be processed based on the target in-phase path data value, the target quadrature path data value, and the input signal data value corresponding to the data point to be processed includes: Multiply the target in-phase path data value by the input signal data value corresponding to the data point to be processed to obtain the in-phase path frequency conversion value; The orthogonal path data value is multiplied by the input signal data value corresponding to the data point to be processed to obtain the orthogonal path frequency conversion value.

7. The digital down-conversion method according to claim 1, characterized in that, After determining the digital down-conversion value of the data point to be processed based on the target in-phase path data value, the target quadrature path data value, and the input signal data value corresponding to the data point to be processed, the process further includes: The digital downconversion value of the data point to be processed is transferred from the GPU device memory to the host memory.

8. A digital down-conversion device, characterized in that, include: A pre-stored complex exponent value table generation unit is used to generate a pre-stored complex exponent value table based on the sampling rate and local oscillator frequency of the input signal during the GPU program initialization phase; wherein, the table length of the pre-stored complex exponent value table is a preset length of the data block, and the pre-stored complex exponent value table includes the in-phase path data value and quadrature path data value corresponding to the index of each GPU thread; The data block acquisition unit is used to acquire each data block to be processed sequentially according to the preset length of the data block during the real-time processing stage of digital down-conversion; The reading unit is used to read the target in-phase path data value and the target orthogonal path data value from the pre-stored complex index value table for any data point to be processed in any data block to be processed, based on the index of the data point to be processed. The frequency conversion value determination unit is used to determine the digital down-conversion value of the data point to be processed based on the target in-phase path data value, the target quadrature path data value, and the input signal data value corresponding to the data point to be processed.

9. An electronic device, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the digital down-conversion method as described in any one of claims 1 to 7.

10. A computer storage medium, characterized in that, It stores a computer program, wherein the computer program, when executed by a processor, implements the digital down-conversion method as described in any one of claims 1 to 7.