Frequency mixing filtering method, device and equipment based on tensor kernel and medium
By adopting a tensor core-based mixing filtering method in the radio receiver, converting the first filter into parallel computing and fusing mixing and filtering calculations, the shortcomings of the traditional FPGA architecture in terms of data processing speed and power consumption are solved, and efficient data processing and low power consumption are achieved.
Patent Information
- Application Number
- CN202510162588.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-02-14
AI Technical Summary
Traditional FPGA architectures have problems with insufficient data processing speed and flexibility in radio receivers, especially when processing large amounts of data, resulting in low data throughput and large system response latency. In addition, FPGA architecture also has the problem of high power consumption, which has become a bottleneck in scenarios with limited power resources.
Using a mixing filtering method based on tensor core, the parallel computing power of the GPU or GPGPU is fully utilized by converting the first filter from serial calculation to parallel calculation and further converting it into matrix multiplication operation. At the same time, the calculation steps of mixing and filtering are fused to reduce data exchange and memory requirements.
It improves the throughput of data processing, reduces processing delays, and reduces memory footprint and power consumption, significantly improves the overall performance of the software radio receiver, allowing it to maintain efficient operation in high-speed, large-capacity data transmission environments.
Smart Images

Figure CN119995620A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of wireless communication technology, and in particular, to a tensor core-based mixing filtering method, device, equipment and medium. Background Art
[0002] The software radio receiver receives radio signals through the antenna. These signals are amplified, mixed and filtered by the RF front end and then converted into intermediate frequency signals or directly into digital signals.
[0003] Traditional radio receiver architectures, such as FPGA (Field Programmable Gate Array), have obvious deficiencies in data processing speed and flexibility. First, FPGA is based on hardware logic design. Although it can provide higher performance in certain specific application scenarios, its serial processing method cannot fully utilize the parallel computing capabilities of modern processors, especially in applications that need to process large amounts of data, resulting in problems such as low data throughput and large system response delays.
[0004] On the other hand, the existing FPGA architecture still has the problem of high power consumption. In large-scale data processing, the overall power consumption of the system increases due to the high data handling overhead, which becomes an important bottleneck in scenarios with limited power resources (such as mobile devices, IoT devices, etc.). Therefore, how to reduce system power consumption while ensuring high processing performance has become a key technical problem that needs to be solved in modern communication systems. Summary of the invention
[0005] Embodiments of the present invention provide a tensor core-based mixing filtering method, apparatus, device and medium to improve data processing throughput, reduce processing delay, and reduce memory usage and power consumption.
[0006] In a first aspect, the present invention provides a mixing filtering method based on tensor kernels, the method comprising:
[0007] Determine a weight coefficient matrix of the first filter according to a functional relationship between an output signal of the first filter and an input signal, wherein the weight coefficient matrix is used to convert an original one-dimensional convolution operation corresponding to the first filter into a matrix multiplication operation of the weight coefficient and the input signal, wherein a stride of the original one-dimensional convolution operation corresponding to the first filter is greater than 1;
[0008] Perform matrix-vector dot multiplication operation on the local oscillator signal matrix corresponding to each local oscillator signal by using the weight coefficient matrix, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering fusion;
[0009] A matrix multiplication operation is performed on the input signal matrix corresponding to the input signal to be processed and the fusion coefficient matrix to perform filtering processing on the input signal.
[0010] Optionally, determining a weight coefficient matrix of the first filter according to a functional relationship between an output signal and an input signal of the first filter includes:
[0011] According to the functional relationship between the output signals and the input signals of each calculation link of the first filter, the number of weight coefficients is determined by determining the number of input signals related to each output value of the first filter;
[0012] Based on the number of weight coefficients, a weight coefficient matrix of the first filter is obtained, wherein the number of rows of the weight coefficient matrix is the downsampling multiple of the first filter, and the number of columns of the weight coefficient matrix is the order of the first filter.
[0013] Optionally, a matrix-vector dot multiplication operation is performed on the weight coefficient matrix and the local oscillator signal matrix corresponding to each local oscillator signal, and the obtained matrix is used as a fusion coefficient matrix after mixing and filtering fusion, including:
[0014] Based on the periodic characteristics of the local oscillator signal, each local oscillator signal is converted into a local oscillator signal vector, wherein the length value of each local oscillator signal vector is the least common multiple of the number of periods of the local oscillator signal and the downsampling multiple of the first filter;
[0015] For each local oscillator signal vector, the local oscillator signal vector is split into N row vectors, each row vector has the same number of elements, and a sub-matrix composed of N row vectors is obtained, and the sub-matrices corresponding to each local oscillator signal vector are spliced by column to obtain a local oscillator signal matrix, wherein N is a positive integer, representing the ratio of the least common multiple of the number of mixing common cycles and the downsampling multiple to the downsampling multiple, and the mixing common cycle is the least common multiple of the cycles of each local oscillator signal;
[0016] Perform vector dot multiplication operation on the local oscillator signal matrix and the weight coefficient matrix, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering fusion.
[0017] Optionally, the input signal matrix corresponding to the input signal to be processed is obtained in the following manner:
[0018] Converting the input signal to be processed into an original input signal matrix, wherein the number of columns of the original input signal matrix is a downsampling multiple of the first filter;
[0019] Based on the periodic characteristics of the local oscillator signal, a row vector is extracted from the original input signal matrix every N rows, and a total of M times are extracted to form an input signal conversion matrix, until the original input signal matrix is traversed to obtain N input signal conversion matrices, where M represents the ratio of the length value of the input signal to be processed to N;
[0020] Accordingly, a matrix multiplication operation is performed on the input signal matrix corresponding to the input signal to be processed and the fusion coefficient matrix, including:
[0021] Perform batch matrix multiplication operation on N input signal conversion matrices and fusion coefficient matrices to obtain a product result;
[0022] The product result is convolved with the set convolution kernel to obtain a signal after mixing filtering, wherein the number of rows and columns of the convolution kernel are both set to the order of the first filter, and one of the diagonal elements of the convolution kernel is set to 1, and the other elements are all set to 0.
[0023] Optionally, the embodiment of the present invention further includes:
[0024] The signal after the mixing filter is subjected to low-pass filtering to obtain an output signal.
[0025] Optionally, low-pass filtering is performed on the mixed filtered signal, including:
[0026] Convert the mixed filtered signal into a data signal matrix that meets the tensor core size requirements, and convert the second filter coefficient into a second filter coefficient matrix that meets the tensor core size requirements, wherein the row value of the data signal matrix is the ratio of the input signal length value to the number of columns of the second filter coefficient matrix, and the column value of the data signal matrix is equal to the row value of the second filter coefficient matrix, and the second filter coefficient matrix is used to convert the original one-dimensional convolution operation corresponding to the second filter into a matrix multiplication operation of the coefficient matrix and the input signal, and the convolution kernel moves one bit each time during the original one-dimensional convolution operation corresponding to the second filter;
[0027] Performing a matrix multiplication operation on the data signal matrix and the coefficient matrix of the second filter, and expanding the obtained result row by row to form a one-dimensional matrix;
[0028] The first set length elements are extracted from the one-dimensional matrix as the filtering result, wherein the set length is the length of the signal after the mixing filter.
[0029] Optionally, the first filter is any one of the following filters:
[0030] Cascaded integrator comb CIC filter, moving average downsampling filter, weighted sliding average downsampling filter;
[0031] The second filter is: a finite length unit impulse response FIR filter.
[0032] In a second aspect, an embodiment of the present invention further provides a mixing filter device based on a tensor core, the device comprising:
[0033] A weight coefficient matrix determination module is configured as a functional relationship between an output signal and an input signal of the first filter, and determines a weight coefficient matrix of the first filter, wherein the weight coefficient matrix is used to convert an original one-dimensional convolution operation corresponding to the first filter into a matrix multiplication operation of the weight coefficient and the input signal, wherein a stride of the original one-dimensional convolution operation corresponding to the first filter is greater than 1;
[0034] The fusion coefficient matrix determination module is configured to perform a matrix-vector dot multiplication operation on the weight coefficient matrix and the local oscillator signal matrix corresponding to each local oscillator signal, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering fusion;
[0035] The mixing filter module is configured to perform a matrix multiplication operation on an input signal matrix corresponding to the input signal to be processed and a fusion coefficient matrix to perform filtering processing on the input signal.
[0036] Optionally, the weight coefficient matrix determination module is specifically configured as follows:
[0037] According to the functional relationship between the output signals and the input signals of each calculation link of the first filter, the number of weight coefficients is determined by determining the number of input signals related to each output value of the first filter;
[0038] Based on the number of weight coefficients, a weight coefficient matrix of the first filter is obtained, wherein the number of rows of the weight coefficient matrix is the downsampling multiple of the first filter, and the number of columns of the weight coefficient matrix is the order of the first filter.
[0039] Optionally, the fusion coefficient matrix determination module is specifically configured as follows:
[0040] Based on the periodic characteristics of the local oscillator signal, each local oscillator signal is converted into a local oscillator signal vector, wherein the length value of each local oscillator signal vector is the least common multiple of the number of periods of the local oscillator signal and the downsampling multiple of the first filter;
[0041] For each local oscillator signal vector, the local oscillator signal vector is split into N row vectors, each row vector has the same number of elements, and a sub-matrix composed of N row vectors is obtained, and the sub-matrices corresponding to each local oscillator signal vector are spliced by column to obtain a local oscillator signal matrix, wherein N is a positive integer, representing the ratio of the least common multiple of the number of mixing common cycles and the downsampling multiple to the downsampling multiple, and the mixing common cycle is the least common multiple of the cycles of each local oscillator signal;
[0042] Perform vector dot multiplication operation on the local oscillator signal matrix and the weight coefficient matrix, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering fusion.
[0043] Optionally, the input signal matrix corresponding to the input signal to be processed is obtained in the following manner:
[0044] Converting the input signal to be processed into an original input signal matrix, wherein the number of columns of the original input signal matrix is the downsampling multiple of the first filter;
[0045] Based on the periodic characteristics of the local oscillator signal, extracting row vectors every N rows from the original input signal matrix, extracting M times in total, forming an input signal conversion matrix, until the original input signal matrix is traversed to obtain N input signal conversion matrices, where M represents the ratio of the length value of the input signal to be processed to N;
[0046] Accordingly, the mixing and filtering module is specifically configured as follows:
[0047] Perform batch matrix multiplication operation on N input signal conversion matrices and fusion coefficient matrices to obtain a product result;
[0048] The product result is convolved with the set convolution kernel to obtain a signal after mixing filtering, wherein the number of rows and columns of the convolution kernel are both set to the order of the first filter, and one of the diagonal elements of the convolution kernel is set to 1, and the other elements are all set to 0.
[0049] Optionally, the device provided by the embodiment of the present invention further includes:
[0050] The low-pass filtering module is configured to perform low-pass filtering on the signal after the mixing filter to obtain an output signal.
[0051] Optionally, the low-pass filter module is specifically configured as follows:
[0052] Convert the mixed filtered signal into a data signal matrix that meets the tensor core size requirements, and convert the second filter coefficient into a second filter coefficient matrix that meets the tensor core size requirements, wherein the row value of the data signal matrix is the ratio of the input signal length value to the number of columns of the second filter coefficient matrix, the column value of the data signal matrix is equal to the row value of the second filter coefficient matrix, and the second filter coefficient matrix is used to convert the original one-dimensional convolution operation corresponding to the second filter into a matrix multiplication operation of the coefficient matrix and the input signal, and the convolution kernel moves one bit each time during the original one-dimensional convolution operation corresponding to the second filter;
[0053] Performing a matrix multiplication operation on the data signal matrix and the coefficient matrix of the second filter, and expanding the obtained result row by row to form a one-dimensional matrix;
[0054] The first set length elements are extracted from the one-dimensional matrix as the filtering result, wherein the set length is the length of the signal after the mixing filter.
[0055] Optionally, the first filter is any one of the following filters:
[0056] Cascaded integrator comb CIC filter, moving average downsampling filter, weighted sliding average downsampling filter;
[0057] The second filter is: a finite length unit impulse response FIR filter.
[0058] In a third aspect, an embodiment of the present invention further provides a computing device, including:
[0059] A memory storing executable program code;
[0060] a processor coupled to the memory;
[0061] The processor calls the executable program code stored in the memory to execute the tensor core-based mixing filtering method provided in any embodiment of the present invention.
[0062] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the tensor core-based mixing filtering method provided by any embodiment of the present invention.
[0063] The technical solution provided by the embodiment of the present invention optimizes the first filter from a serial operation mode to a parallel operation mode through matrix multiplication. The output of each link is only related to part of the input and has nothing to do with the previous output. The output of each link can be calculated simultaneously or separately without relying on the previous output result. This setting accelerates the filtering process of the first filter and meets the needs of high-speed communication. In addition, by integrating the calculation steps of mixing and filtering, the calculation of these two steps can be completed simultaneously in a parallel computing task, avoiding frequent data exchange, thereby further reducing memory requirements and data transmission delays. The parallel processing method provided by the embodiment of the present invention greatly improves the overall performance of the software radio receiver, enabling it to maintain efficient operation in a high-speed, large-capacity data transmission environment.
[0064] The innovative features of the embodiments of the present invention include:
[0065] 1. According to the functional relationship between the output signal and the input signal of the first filter, the weight coefficient matrix of the first filter is determined, so as to convert the first filter from the traditional serial calculation mode to parallel calculation, and further convert it into the matrix multiplication calculation of the input signal and the filter coefficient. This parallel form gives full play to the parallel acceleration advantage of tensor cores in matrix operations. Using the parallel computing capability of processing units such as GPU or GPGPU to accelerate the filtering process and meet the needs of high-speed communication is one of the innovative points of the embodiment of the present invention.
[0066] 2. By integrating the calculation steps of mixing and filtering, the operations of these two steps can be completed simultaneously in one parallel computing task, avoiding frequent data exchange and further reducing memory requirements and data transmission delays. This is one of the innovative points of the embodiment of the present invention.
[0067] 3. By converting the filtering process of the second filter from the original one-dimensional convolution operation to a highly optimized matrix multiplication, the parallel computing advantages of the tensor core can be better utilized, which greatly improves the speed of filtering calculation and resource utilization. It is particularly suitable for application in large-scale data processing and real-time signal processing scenarios, which is one of the innovations of the embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0069] Figure 1a A flowchart of a mixing filtering method based on tensor kernels provided in Embodiment 1 of the present invention;
[0070] Figure 1b A schematic diagram of the structure of a three-stage CIC filter provided in Embodiment 1 of the present invention;
[0071] Figure 1c A schematic diagram of a conventional CIC filter provided in Embodiment 1 of the present invention performing a one-dimensional convolution operation on an input signal;
[0072] Figure 1d A schematic diagram of a conventional CIC filter provided in Embodiment 1 of the present invention performing a two-dimensional convolution operation on an input signal;
[0073] Figure 1e A schematic diagram of a local oscillator signal vector provided in Embodiment 1 of the present invention;
[0074] Figure 1fThe present invention is a schematic diagram of a conversion matrix for converting an input signal into N input signals provided by Embodiment 1;
[0075] Figure 1g A schematic diagram of performing batch matrix multiplication operations on 128 input signal matrices and 128 fusion coefficient matrices provided in Embodiment 1 of the present invention;
[0076] Figure 1h A schematic diagram of restoring the positions of the elements of each row of the batch matrix multiplication result provided in the first embodiment of the present invention;
[0077] Figure 1i A schematic diagram of a mixing filtering result provided in Embodiment 1 of the present invention;
[0078] Figure 2a A flowchart of a mixing filtering method based on tensor kernels provided in Embodiment 2 of the present invention;
[0079] Figure 2b A schematic diagram of a process of forming a data signal matrix provided in Embodiment 2 of the present invention;
[0080] Figure 2c A schematic diagram of another process of forming a data signal matrix provided in the second embodiment of the present invention;
[0081] Figure 3 A structural block diagram of a frequency mixing and filtering device based on tensor core provided in Embodiment 3 of the present invention;
[0082] Figure 4 A schematic diagram of the structure of a computing device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0083] 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.
[0084] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present invention and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0085] The embodiments of the present invention disclose a mixing filtering method, device, equipment and medium based on tensor core. In order to more clearly and clearly describe the contents of each embodiment of the present invention, the implementation principle of the present invention is briefly introduced below.
[0086] First of all, the mixing mentioned in the embodiment of the present invention is the process of multiplying the input signal with the local oscillator signal, which can realize the frequency conversion. In software radio, mixing is usually used to down-convert high-frequency signals to intermediate frequencies or baseband. By selecting an appropriate local oscillator frequency, mixing can effectively move the part of interest in the signal spectrum to a frequency range that is easier to handle. After mixing, the spectrum of the signal will have a frequency offset, which makes subsequent processing (such as filtering and demodulation) simpler and more efficient. In the mixing process, two mutually orthogonal I (real part) and Q (imaginary part) outputs will be generated for each signal. For example, the traditional mixing process can be expressed by the following formula:
[0087]
[0088] Where n is the time point, I(n) is the real output after mixing, Q(n) is the virtual output after mixing, and x(n) is the input signal. is the local oscillator signal, and its period is f c represents the frequency of the input signal to be processed, f s =RF-IF, represents the mixing frequency, RF represents the center frequency value of the input signal frequency range, and IF represents the desired target frequency value.
[0089] In a software radio receiver, since the frequency of the baseband signal is unknown, multi-channel mixing is required. Specifically, the receiver mixes the same input signal with multiple local oscillator signals of different frequencies. This process down-converts the different frequency components of the input signal to different intermediate frequencies or baseband ranges. Through this multi-channel mixing method, the receiver can process multiple output signals at the same time, ensuring that all potential baseband signals can be effectively captured and processed. This multi-channel parallel frequency conversion method greatly improves the flexibility and adaptability of the receiver, enabling it to cope with multi-band signals in complex radio environments.
[0090] As shown in the above formula, the local oscillator signal is a sine wave and a cosine wave of a fixed frequency. In the present invention, based on the periodicity of the sine function and the cosine function, the mixing calculation is integrated into the filter calculation, thereby optimizing the filtering process.
[0091] Secondly, regarding the first filter mentioned in the embodiment of the present invention, the filter realizes high-pass filtering and downsampling of the signal through a one-dimensional convolution operation. The characteristic of the filter is that during the convolution process, the convolution kernel moves to the right by multiple bits each time (downsampling multiple R), the number of data points of the input signal is L, and the number of data points of the signal after filtering is L / R. The filter can be any one of a CIC (Cascaded Integrator Comb) filter, a moving average downsampling filter, a weighted sliding average downsampling filter, or other filters having the characteristics of the above filters. The embodiment of the present invention does not specifically limit the type of the first filter.
[0092] In an embodiment of the present invention, based on the working principle of the first filter, the first filter is converted from a serial calculation mode to a parallel calculation, and further converted into a matrix multiplication calculation of the input signal and the first filter coefficient. The parallel computing capabilities of processing units such as GPU (Graphics Processing Units, general-purpose graphics processing units) and GPGPU (General-Purpose Computing OnGraphics Processing Units, general-purpose graphics processing units) are utilized to accelerate the filtering process, thereby meeting the needs of high-speed communication.
[0093] In addition, regarding the second filter mentioned in the embodiment of the present invention, the second filter is used to perform low-pass filtering on the filtered signal output by the first filter, remove high-frequency noise in the signal and retain low-frequency components. The characteristics of the second filter are: filtering is achieved through a one-dimensional convolution operation. During the convolution process, the convolution kernel moves one bit to the right each time, that is, the number of data points of the input signal and the output signal after filtering is the same. Specifically, the filter can be a FIR (Finite Impulse Response) low-pass filter or other filters having the characteristics of the above-mentioned second filter. The embodiment of the present invention does not specifically limit the type of the second filter.
[0094] The second filter has the advantage of linear phase and can ensure the fidelity of the signal, but its computational complexity is high, especially in high-order filters, which require a large number of multiplication and addition operations. The traditional second filter usually uses a serial calculation method to process signal samples one by one, and the processing speed is slow. In an embodiment of the present invention, by parallelizing the convolution operation of the second filter, the computational efficiency can be significantly improved. Specifically, the input signal and the coefficients of the second filter are matrixed, and the matrix multiplication acceleration operation of GPGPU or GPU is used to realize the simultaneous processing of multiple signal samples, which greatly shortens the operation time and improves the filtering efficiency.
[0095] In an embodiment of the present invention, the processing steps of the first filter and the second filter are parallelized and transformed, and the mixing and filtering operations are converted into matrix multiplication, so that it is suitable for accelerated processing on the tensor core of a processing unit such as a GPU or GPGPU. Traditional filters rely on serial calculations during data processing and fail to fully utilize the parallel computing capabilities of modern processors, resulting in low efficiency when processing large-scale data. The present invention fully utilizes the parallel computing capabilities of tensor cores by parallelizing these filter algorithms, significantly improves the throughput of data processing, reduces data processing delays, and solves the bottleneck problem of filtering in the prior art.
[0096] In addition, an embodiment of the present invention also provides an innovative solution for integrating frequency mixing calculations and filtering. In the traditional processing flow, frequency mixing calculations and downsampling filter calculations are performed independently, which leads to frequent data transfer and increases the system's memory requirements and power consumption. By integrating the two, data transfer can be effectively reduced, memory usage and power consumption can be reduced, thereby further improving the overall performance of the system. This technical solution is particularly suitable for modern high-speed communication systems, especially in application scenarios with extremely high power consumption requirements such as mobile communications and the Internet of Things, or in other large-scale data processing scenarios, and can significantly optimize the data processing process.
[0097] The technical solution of this patent not only has significant advantages in performance optimization, but also has greatly improved the flexibility and scalability of the system. The programmability of GPGPU enables the system to quickly adapt to different communication standards and spectrum requirements, avoiding the disadvantage of the traditional FPGA architecture that requires hardware redesign when the standard is updated. This high flexibility makes the technical solution of the present invention have broad application prospects in the development of future communication systems.
[0098] The following is a detailed introduction to the contents of each embodiment of the present invention.
[0099] Embodiment 1
[0100] Figure 1a The flowchart of a mixing and filtering method based on tensor cores is provided in the first embodiment of the present invention. The method can be applied to the scenario where a radio receiver performs mixing and filtering on a received signal. The method provided in this embodiment can be performed by a mixing and filtering device based on tensor cores, which can be implemented in software and / or hardware. Figure 1a As shown, the method provided in this embodiment specifically includes:
[0101] S110. Determine a weight coefficient matrix of the first filter according to a functional relationship between an output signal and an input signal of the first filter.
[0102] Among them, the first filter implements high-pass filtering and downsampling of the signal through a one-dimensional convolution operation. The characteristics of the filter are: the stride is greater than 1, that is, the convolution kernel moves to the right by multiple bits each time during the convolution process (downsampling multiple R), the number of data points of the input signal is L, and the number of data points of the filtered signal is L / R. The filter can be any one of a CIC (Cascaded Integrator Comb) filter, a moving average downsampling filter, a weighted sliding average downsampling filter, or other filters with the above characteristics. The embodiment of the present invention does not specifically limit the type of the first filter.
[0103] In this embodiment, considering that the traditional first filter usually adopts a serial calculation method, which has low processing efficiency, the first filter is converted from a serial calculation method to a parallel calculation, and further converted into a matrix multiplication calculation of the input signal and the filter coefficient. This parallel form gives full play to the parallel acceleration advantage of the tensor core in matrix operations, and utilizes the parallel computing capabilities of processing units such as GPU or GPGPU to accelerate the filtering process and meet the needs of high-speed communication.
[0104] In this embodiment, when determining the functional relationship between the output signal and the input signal of the first filter, the functional relationship between the output signal and the input signal of each calculation link (such as the integral link and the differential link) in the first filter can be determined first, and then the functional relationship between the output signal and the input signal of the first filter can be obtained, that is, the input signals of which the i-th output is weighted and summed and the corresponding weight coefficients, so that the first filter can be changed from a series calculation form to a parallel calculation form. After determining the number of input signals related to each output value of the first filter, that is, the number of weight coefficients, and the specific weight coefficients, for each weight coefficient, some of the weight coefficient values can be filled with 0 to obtain a weight coefficient matrix with the number of rows being the downsampling multiple of the first filter and the number of columns being the number of stages of the first filter;
[0105] The following takes the case where the first filter is a CIC filter as an example to illustrate the process of determining the weight coefficient matrix.
[0106] Among them, the CIC filter is composed of an integral link, a downsampling link and a differential link. Among them, the functional relationship between the input and output of the integral link is:
[0107]
[0108] The functional relationship between the input and output of the subsequent links is:
[0109]
[0110] Among them, I nrepresents the nth output of the integral link; i represents the location of the data point; j represents the accumulated variable, whose value range is 0 to S-2, x n-i represents the nith input signal; S represents the downsampling order; y n×R represents the nth output of the CIC filter; k represents another accumulated variable, whose value range is 0 to S, and R represents the downsampling multiple.
[0111] By combining the above two functional relationships into one, the functional relationship between the input signal and the output signal can be obtained, so that the weight coefficient of the filter and the number of input signals related to each output value can be determined.
[0112] Specifically, Figure 1b A schematic diagram of the structure of a three-stage CIC filter provided in Embodiment 1 of the present invention is shown in FIG. Figure 1b As shown, the CIC filter consists of three integral links (I), a downsampling link (R) and three differential links (D). The output of each link is different and calculated simultaneously. Among them, the integral link can be expressed by the following formula:
[0113]
[0114] For a comb filter with M=1, the relationship between its input and output is:
[0115] (2)y n×R =I n×R -3I (n-1)×R +3I (n-2)×R -I (n-3)×R
[0116] Among them, i represents the position of the data point, starting from 0, x n-i represents the ni-th input data, x n represents the i-th input data, y n×R represents the nth output, and R represents the downsampling factor.
[0117] After substituting formula (1) into formula (2), there are 3R-2 non-zero terms x remaining. nR ~x nR-3R+3 :
[0118]
[0119] Through the above formula conversion, each output is obtained by simply adding up the weighted sum of the previous inputs, and all outputs can be calculated at the same time, that is, they can be calculated in parallel.
[0120] In addition, it can be seen from the formula that for a 3rd-order CIC filter, the n×Rth output is only related to the nR-3R+3th input signal (the subscript of the first sum of the formula) to the nRth (the superscript of the last sum of the formula), that is, it is only related to nR-(nR-3R+3)+1=3R-2 values. Extended to the first filter with an order of S and a downsampling multiple of R, each output value is only related to S*R-(S-1) values of the input signal, which is equivalent to the weighted sum of these S*R-(S-1) values, that is, the CIC filter has S*R-(S-1) weight coefficients. Therefore, the first filter can be converted into a weighted parallel reduction algorithm for parallel accelerated calculation. The first filter can also be regarded as a one-dimensional convolution with a convolution kernel of (1, S*R) and a stride of R, where R is the downsampling multiple, S is the filter order, and M=1.
[0121] Specifically, we still take the CIC filter with a convolution kernel length of 4 and a stride R of 2 as an example. Figure 1c This is a schematic diagram of a conventional CIC filter provided in Embodiment 1 of the present invention performing a one-dimensional convolution operation on an input signal. Figure 1c As shown in the figure, the length of the input signal is 10. After the convolution operation, the length of the output signal is 5. When the input signal is a multi-channel signal, the CIC one-dimensional convolution can also be regarded as a two-dimensional convolution. Figure 1d The schematic diagram of the conventional CIC filter provided in the first embodiment of the present invention performing a two-dimensional convolution operation on the input signal is as follows: Figure 1d As shown, multiple input signals of length L form a two-dimensional matrix, the convolution kernel is also a two-dimensional matrix, and the output signal is also a two-dimensional matrix of length L.
[0122] Since the execution efficiency of one-dimensional convolution and two-dimensional convolution on hardware is not high enough, in order to make full use of tensor cores, the first filter can be converted from convolution operation to matrix multiplication operation. The specific operation process is as follows:
[0123] 1. Convert the input signal of length L into an original input signal matrix X of M*R, wherein the number of columns R of the original input signal matrix is the downsampling multiple of the first filter, and the number of rows M of the original input signal matrix is L / R.
[0124] 2. Fill the S*R–(S-1) weight coefficients with (S-1) zeros, and then arrange them in columns into a weight coefficient matrix of the first filter of R*S, thereby obtaining the weight coefficient matrix of the first filter.
[0125] 3. Perform matrix multiplication on the matrix X corresponding to the input signal and the weight coefficient matrix C to obtain an output matrix with L / R rows and S columns, that is, Y = XC
[0126] 4. Add the diagonal elements of the output matrix to get the final output y of the first filter i =Y i,0 +Y i+1,1 +Y i+2,2 +…+Y i+S-1,S-1 , the output signal length is L / R.
[0127] By adopting the above technical solution, the traditional first filter can be optimized, that is, the filtering process of the traditional first filter is converted from the original one-dimensional convolution operation to the matrix multiplication operation based on the tensor core. This new filtering method can be applied to the subsequent mixing filtering process, that is, the optimized first filter is first used to filter the local oscillator signal in the mixing process by matrix multiplication, and then the processing result is used as the fusion coefficient matrix to filter the input signal to be processed. The filtering processing method also adopts the matrix multiplication operation. For the specific process, please refer to the following steps S120 to S130.
[0128] S120, performing a matrix-vector dot multiplication operation on the local oscillator signal matrix corresponding to each local oscillator signal using the weight coefficient matrix, and using the obtained matrix as a fusion coefficient matrix after mixing and filtering fusion.
[0129] The local oscillator signal is a sine wave and cosine wave with a fixed frequency. As can be seen from the above mixing formula, the period of each local oscillator signal is f c / f s , where f c represents the frequency of the input signal to be processed, f s =RF-IF, represents the mixing frequency, wherein RF represents the center frequency value of the input signal frequency range, and IF represents the desired target frequency value. In this embodiment, the least common multiple of the periods of the local oscillator signals of each channel is the common mixing period, and the ratio N of the least common multiple of the number of common mixing periods and the downsampling multiple of the first filter to the downsampling multiple, that is, for the input signal, the local oscillator signal values of every N rows are the same. For example, if the number of common mixing periods is 2560, and the number of columns of the input signal matrix is R=100 (downsampling multiple), the least common multiple of 2560 and 100 is 12800=100*128, that is, the mixing signal vectors of every 128 rows of the input signal matrix are the same.
[0130] Accordingly, the present embodiment can convert the input signal into N input signal conversion matrices. The specific conversion method is to first convert the input signal into the original input signal matrix, wherein the number of columns of the original input signal matrix is the downsampling multiple of the first filter. Then, based on the periodic characteristics of the local oscillator signal, a row vector is extracted from the original input signal matrix every N rows, and extracted M times in total to form an input signal conversion matrix, until all row vectors of the original input signal matrix are traversed to obtain N input signal conversion matrices, wherein M represents the ratio of the length value of the input signal to be processed to N.
[0131] In this embodiment, based on the periodic characteristics of the local oscillator signal, the local oscillator signal can also be converted into a local oscillator signal matrix. When converting each local oscillator signal into a local oscillator signal matrix, only the values of some local oscillator signals can be calculated, and other values can be repeatedly obtained based on the periodic characteristics.
[0132] Specifically, the conversion of each local oscillator signal into a local oscillator signal matrix can be obtained by the following method:
[0133] A. Based on the periodic characteristics of the local oscillator signal, each local oscillator signal is converted into a local oscillator signal vector.
[0134] For example, if there are 100 local oscillator signals, the period of each local oscillator signal is 2560, and the least common multiple of the period 2560 and the downsampling factor R=100 of the first filter=12800=100*128. Figure 1e A schematic diagram of a local oscillator signal vector provided in the first embodiment of the present invention, such as Figure 1e As shown, for each local oscillator signal, the periodic signal with a length of 2560 can be repeated 5 times to obtain a local oscillator signal vector with a length of 12800.
[0135] B. For each local oscillator signal vector, split the local oscillator signal vector into N row vectors, each of which has the same number of elements, to obtain a sub-matrix composed of N row vectors, and concatenate the sub-matrices corresponding to each local oscillator signal vector by column to obtain a local oscillator signal matrix.
[0136] In this embodiment, in order to correspond to N input signal matrices, each local oscillator signal vector can be traversed in turn, and then a set number of values can be extracted from the current local oscillator signal vector in turn as the row vector of the local oscillator signal matrix, wherein the set number is the same as the number of local oscillator signals, until N row vectors are extracted to obtain the sub-matrix corresponding to the local oscillator signal of the path, and so on. After traversing all the local oscillator signal vectors, the sub-matrices corresponding to the local oscillator signal vectors of each path are spliced by column to obtain the local oscillator signal matrix.
[0137] For example, Figure 1eAs shown, the 1st to 100th values are extracted from each local oscillator signal vector with a length of 12800 as the first row of the submatrix, and the 101st to 200th values are extracted as the second row of the submatrix, until the 12701st to 12800th values are extracted as the last row of the submatrix. The other local oscillator signal vectors can be operated according to the above operation to obtain the corresponding submatrix, and then the submatrices are spliced by column to obtain the local oscillator signal matrix.
[0138] In this embodiment, after obtaining the local oscillator signal matrix, the local oscillator signal matrix and the weight coefficient matrix of the first filter are vector-dot multiplied, thereby realizing the filtering processing of the local oscillator signal by the first filter. The obtained result can be used as a fusion coefficient matrix after mixing and filtering fusion, and the fusion coefficient matrix can be used to filter the input signal to be processed.
[0139] Specifically, Figure 1e As shown, when the local oscillator signal matrix and the weight coefficient matrix of the first filter are vector-dot multiplied, the N matrices obtained are:
[0140] The first matrix:
[0141] [C1*M 11 , C2*M 11 , C3*M 11 , C1*M 21 , C2*M 21 , C3*M 21 ,…,,C1*M 100_1 , C2*M 100_1 , C3*M 100_1 ],
[0142] The second matrix:
[0143] [C1*M 12 , C2*M 12 , C3*M 12 , C1*M 22 , C2*M 22 , C3*M 22 ,…,C1*M 100_2 , C2*M 100_2 , C3*M 100_2 ],
[0144] …
[0145] The 128th matrix:
[0146] [C1*M 1_128 , C2*M 1_128 , C3*M 1_128 , C1*M 2_128 , C2*M 2_128 , C3*M2_128 ,…,C1*M 100_128 , C2*M 100_128 , C3*M1 00_128 ].
[0147] In this embodiment, by fusing mixing and filtering and expressing them as matrix multiplication, the memory requirement is effectively reduced. In the related art, mixing and filtering are calculated separately. For example, for processing multiple signals, taking C = 100 signals, signal frequency 256MHz, signal length L = 256e6, CIC downsampling multiple R = 100, and FP16 storage as an example, the memory requirement = C*L*2 = 100*256e6*2bytes = 51.2GB. In this embodiment, by merging the local oscillator signal and CIC as operators and expressing them as matrix multiplication, the memory requirement = C*L / R*2 = 100*256e4*2bytes = 0.512GB, and the memory requirement is reduced by R = 100 times.
[0148] S130, performing a matrix multiplication operation on an input signal matrix corresponding to the input signal to be processed and a fusion coefficient matrix to perform filtering processing on the input signal.
[0149] The input signal matrix corresponding to the input signal to be processed can be obtained as follows:
[0150] Converting the input signal to be processed into an original input signal matrix, wherein the number of columns of the original input signal matrix is the downsampling multiple of the first filter, and the number of rows is the ratio of the length of the input signal to be processed to the downsampling multiple of the first filter;
[0151] Based on the periodic characteristics of the local oscillator signal, a row vector is extracted from every N rows of the original input signal matrix, and extracted M times in total to form an input signal conversion matrix, until the original input signal matrix is traversed to form N input signal conversion matrices, where N is a positive integer, representing the ratio of the least common multiple of the mixing common period number and the downsampling multiple to the downsampling multiple, and the mixing common period is the least common multiple of the periods of the local oscillator signals of each channel. M represents the ratio of the length of the input signal to be processed to N,
[0152] For example, Figure 1f The present invention is a schematic diagram of a conversion matrix for converting an input signal into N input signals provided by Embodiment 1, such as Figure 1fAs shown, the 0th row, the 128th row, the 256th row, ... are extracted from the original input signal matrix of M*R to form the first input signal conversion matrix; the 1st row, the 129th row, the 257th row, ... are extracted from the original input signal matrix of M*R to form the second input signal conversion matrix; until the 127th row, the 255th row, ... are extracted from the original input signal matrix of M*R to form the 128th input signal conversion matrix.
[0153] After obtaining N input signal conversion matrices, batch matrix multiplication operations can be performed on the N input signal conversion matrices and the N fusion coefficient matrices, that is, the first input signal conversion matrix and the first fusion coefficient matrix are matrix multiplied, the second input signal conversion matrix and the second fusion coefficient matrix are matrix multiplied... the Nth input matrix and the Nth fusion coefficient matrix are matrix multiplied to obtain the product result.
[0154] For example, Figure 1g A schematic diagram of batch matrix multiplication operation of 128 input signal matrices and 128 fusion coefficient matrices provided in the first embodiment of the present invention is shown in FIG. Figure 1g As shown, after matrix multiplication operation is performed on each input signal matrix and the corresponding fusion coefficient matrix, 128 batch matrix multiplication operation results of [L, R]*[R, S*C] are obtained, that is, 128 result matrices of [L, S*C] are obtained.
[0155] After obtaining the product result of the batch matrix multiplication, the row elements in the product result of the batch matrix multiplication can be rearranged according to the inverse operation of converting the input signal into N input signal conversion matrices, so as to restore the row elements to their positions in the original input signal matrix. For example, Figure 1h As shown, the 0th row of the first matrix of the product result is used as the 0th row of the restored matrix, the 1st row of the first matrix of the product result is used as the 128th row of the restored matrix, the 2nd row of the first matrix of the product result is used as the 256th row of the restored matrix, and so on..., and the 0th row of the second matrix of the product result is used as the 1st row of the restored matrix, the 1st row of the second matrix of the product result is used as the 129th row of the restored matrix, the 2nd row of the second matrix of the product result is used as the 257th row of the restored matrix, and so on, until the 128th matrix in the product result is traversed, and the positions of the elements of each row in these 128 matrices are restored to their positions in the original input signal. Specifically, the above 128 [L, S*C] result matrices are rearranged to obtain a matrix of [L*128, S*C].
[0156] Then, the product result after the position of each row element is restored is convolved with the set convolution kernel to obtain a signal after mixing and filtering, wherein the number of rows and columns of the convolution kernel are set to the order of the first filter, and one of the diagonal elements of the convolution kernel is set to 1, and the other elements are set to 0. The traditional element-by-element addition cannot fully utilize the computing performance of the tensor core. This embodiment can maximize the efficient computing power of the tensor core by designing a diagonal convolution kernel with all 1s and completing the diagonal summation operation through the convolution operation.
[0157] Specifically, Figure 1i A schematic diagram of a mixing filter result provided in the first embodiment of the present invention is shown in FIG. Figure 1h As shown, a convolution kernel with diagonal elements of 1 is designed, and the batch matrix product results after the position of each row element is restored are supplemented with S-1 rows of 0, and then Figure 1h The convolution kernel shown in FIG. 1 is convolved to perform diagonal summation to obtain the final mixing and filtering result. That is, each column in the matrix obtained after the convolution operation is the filtering result of each signal. For example, the above rearranged matrix [L*128, S*C] is converted into Figure 1i Perform diagonal convolution in the manner shown to obtain a result matrix of [L*128,C].
[0158] In the related art, the first filter adopts a serial operation mode, and each output is related to the previous output. In this embodiment, by optimizing the first filter from a serial operation mode to a parallel operation mode through matrix multiplication, the output of each link is only related to part of the input, but not to the previous output, and the output of each link can be calculated simultaneously or separately without relying on the previous output result. This setting realizes the acceleration of the filtering process of the first filter and meets the needs of high-speed communication. In addition, by integrating the calculation steps of mixing and filtering, the calculation of these two steps can be completed simultaneously in a parallel computing task, avoiding frequent data exchange, thereby further reducing memory requirements and data transmission delays. The parallel processing method provided by this embodiment greatly improves the overall performance of the software radio receiver, enabling it to maintain efficient operation in a high-speed, large-capacity data transmission environment.
[0159] Furthermore, after the input signal to be processed is subjected to mixing, filtering and fusion processing, the signal after mixing and filtering can also be subjected to low-pass filtering processing to effectively clean up unnecessary frequency components in the signal, thereby improving signal quality and ensuring the accuracy of subsequent processing. For details, please refer to the following embodiment 2.
[0160] Embodiment 2
[0161] Figure 2aA flowchart of a mixing filtering method based on tensor cores is provided in the second embodiment of the present invention. Based on the above embodiment, this embodiment further performs low-pass filtering on the filtering result obtained in the above embodiment through an improved second filter, such as Figure 2a As shown, the method provided in the second embodiment of the present invention includes:
[0162] S210. Determine a weight coefficient matrix of the first filter according to a functional relationship between an output signal and an input signal of the first filter.
[0163] S220, performing a matrix-vector dot multiplication operation on the local oscillator signal matrix corresponding to each local oscillator signal using the weight coefficient matrix, and using the obtained matrix as a fusion coefficient matrix after mixing and filtering fusion.
[0164] S230, performing a matrix multiplication operation on an input signal matrix corresponding to the input signal to be processed and a fusion coefficient matrix to perform filtering processing on the input signal.
[0165] Among them, steps S210 to S230 can refer to the description of the above embodiment and will not be repeated here.
[0166] S240, converting the mixed and filtered signal into a data signal matrix that meets the tensor core size requirements.
[0167] This embodiment further filters the signal after the mixing and filtering of the above embodiment through the optimized second filter. The characteristic of the traditional second filter is that filtering is performed through one-dimensional convolution. During the convolution process, the convolution kernel moves one position to the right each time, that is, the number of data points of the input signal and the output signal after filtering is the same. Since the traditional one-dimensional convolution cannot achieve the best computing efficiency on the tensor core, this embodiment is optimized for its characteristics. In order to improve the computing performance, the one-dimensional convolution operation is converted into a highly optimized matrix multiplication by rearranging the input signal, that is, the signal after the mixing and filtering of the above embodiment, and the second filter coefficient (convolution kernel). This method can better utilize the parallel computing advantages of tensor cores, greatly improve the speed and resource utilization of filtering calculations, and is particularly suitable for large-scale data processing and real-time signal processing scenarios. Among them, when converting the second filter coefficients into the second filter coefficient matrix that meets the tensor core size requirements, the functional relationship between the input signal and the output signal of the second filter can be determined first, so that the coefficients of the second filter can be obtained. For example, for an FIR filter, the output signal of the FIR filter can be calculated by the following convolution formula:
[0168]
[0169] Among them, y[n] represents the output signal of the filter, x[n] represents the input signal, h[k] represents the impulse response (coefficient) of the filter, N represents the order of the filter, n represents the nth output of the filter, and k represents the index variable of the summation, which is used to traverse from 0 to N-1, representing the calculation of different time points in the input signal and impulse response.
[0170] In the above formula, the coefficient before the input signal x is the coefficient of the FIR filter. The FIR coefficient can be designed by Matlab (a commercial mathematical software used for data analysis, wireless communication, deep learning, image processing and computer vision) according to the requirements, or can also be obtained by the filter coefficient calculation function signal.firwin (fir_taps, cutoff_freq, window = "hamming", fs_fir) of python (a cross-platform computer programming language), where fir_taps is the filter order, cutoff_freq is the cutoff frequency, window is the window function, and fs_fir is the frequency of the input signal in the FIR filtering process, that is, the frequency of the signal after mixing filtering in the above embodiment. Specifically, fs_fir = fc / R, which represents the ratio of the frequency of the input signal in the CIC mixing filtering process to the downsampling multiple of the CIC filter.
[0171] For the second filter with an order of T, its filter coefficients are arranged in columns into a second filter coefficient matrix, where the specific number of matrix columns FIR_COL is D (D is a multiple of the tensor core size), the number of rows FIR_ROW is = D + T-1, and the remaining positions are filled with 0. The function of the second filter coefficient matrix is to convert the original one-dimensional convolution operation corresponding to the second filter into a matrix multiplication operation of the coefficient matrix and the input signal. It should be noted that the FIR involved in this embodiment is illustrated by taking the second filter as an FIR filter as an example. The second filter can also be other filters that meet the characteristics of the above-mentioned second filter, and this embodiment does not specifically limit this.
[0172] In addition, the signal after mixing and filtering is converted into a data signal matrix that meets the tensor core size requirements. The row value X_row is the ratio of the length value of the FIR input signal (i.e., the length of the signal output after mixing and filtering) to the number of columns of the second filter coefficient matrix, which is calculated by rounding up to an integer, i.e., X_row = math.ceil(L_fir / FIR_col). Specifically, L_fir = L / R, where L is the signal length before mixing and filtering, and R is the CIC filter downsampling multiple. The column value X_col of the data signal matrix is equal to the row value of the second filter coefficient matrix, i.e., X_col = FIR_row. The specific conversion process of the data signal matrix can be implemented in the following way: Please refer to Figure 2b.
[0173] When the number of rows of the second filter coefficient matrix is greater than or equal to 2*T-2, the mixed filtered signal is converted into a data signal matrix that meets the tensor core size requirements through the following steps A1 to A4, where T represents the order of the second filter coefficients,
[0174] A1, expanding the mixed and filtered signal row by row into a one-dimensional first intermediate matrix;
[0175] A2, filling the value 0 at the beginning position of the first intermediate matrix so that the matrix after filling 0 can be rearranged into the second intermediate matrix X1, where the number of rows of the second intermediate matrix is X_row+1, and the number of columns is the number of columns of the second filter coefficient matrix, where X_row represents the number of rows of the matrix corresponding to the signal after mixing and filtering;
[0176] A3. Extract the elements from the 0th row to the second to last row and the last T-1 columns from the second intermediate matrix to form a third intermediate matrix X2, and extract the elements from the 1st row to the last row of the second intermediate matrix to form a fourth intermediate matrix;
[0177] A4. Concatenate the third intermediate matrix and the fourth intermediate matrix by column to obtain a data signal matrix that meets the tensor core size requirement;
[0178] Alternatively, see Figure 2c , when the number of rows of the FIR coefficient matrix is greater than the preset 2*T-2, the mixed filtered signal is converted into a data signal matrix that meets the tensor core size requirements through the following steps B1 to B5:
[0179] B1, expanding the mixed and filtered signal row by row into a one-dimensional first intermediate matrix;
[0180] B2. Fill 0 at the start position and the end position of the first intermediate matrix respectively, so that the matrix after filling 0 can be rearranged into a fifth intermediate matrix X_left by row, wherein the number of rows of the fifth intermediate matrix is X_row, the number of columns is the number of columns of the second filter coefficient matrix FIR_col, the number of 0 filled at the start position is (T-1) / 2, and the number of 0 filled at the end position is max(0,X_row*FIR_col-L-(T-1) / 2); and,
[0181] B3. Fill the start position and the end position of the first intermediate matrix with 0 respectively, so that the matrix after filling with 0 can be rearranged row by row into the sixth intermediate matrix X_right, wherein the number of rows of the sixth intermediate matrix is X_row+1, the number of columns is FIR_col, the number of 0s filled in the start position is FIR_col, and the number of 0s filled in the end position is X_row*FIR_col-L;
[0182] B4, extracting the elements from the 0th row to the second to last row and the last (T-FIR_col-1) columns of the sixth intermediate matrix to form a seventh intermediate matrix X_right_1, and extracting the elements from the 1st row to the last row of the sixth intermediate matrix to form an eighth intermediate matrix X_right_2;
[0183] B5. Concatenate the fifth intermediate matrix, the seventh intermediate matrix, and the eighth intermediate matrix by column to obtain a data signal matrix that meets the tensor core size requirements.
[0184] S250, performing matrix multiplication operation on the data signal matrix and the coefficient matrix of the second filter, and expanding the obtained result row by row to form a one-dimensional matrix, and extracting elements of a predetermined length from the one-dimensional matrix as filtering results.
[0185] The set length is the length of the signal after mixing and filtering.
[0186] In this embodiment, the coefficient matrix of the second filter and the signal after mixing filtering are respectively converted into matrices that meet the size requirements of the tensor core, and the filtering process of the second filter is converted from the original one-dimensional convolution operation to a highly optimized matrix multiplication. This can better utilize the parallel computing advantages of the tensor core, greatly improve the speed of filtering calculations and resource utilization, and is particularly suitable for application in large-scale data processing and real-time signal processing scenarios.
[0187] Embodiment 3
[0188] Figure 3 A structural block diagram of a mixing filter device based on tensor core provided in the third embodiment of the present invention, such as Figure 3 As shown, the device includes: a weight coefficient matrix determination module 310, a fusion coefficient matrix determination module 320 and a mixing filter module 330, wherein:
[0189] A weight coefficient matrix determination module 310 is configured to determine a weight coefficient matrix of the first filter based on a functional relationship between an output signal and an input signal of the first filter, wherein the weight coefficient matrix is used to convert an original one-dimensional convolution operation corresponding to the first filter into a matrix multiplication operation of the weight coefficient and the input signal, wherein a stride of the original one-dimensional convolution operation corresponding to the first filter is greater than 1;
[0190] The fusion coefficient matrix determination module 320 is configured to perform a matrix-vector dot multiplication operation on the weight coefficient matrix and the local oscillator signal matrix corresponding to each local oscillator signal, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering fusion;
[0191] The frequency mixing and filtering module 330 is configured to perform a matrix multiplication operation on an input signal matrix corresponding to the input signal to be processed and a fusion coefficient matrix, so as to perform filtering processing on the input signal.
[0192] Optionally, the weight coefficient matrix determination module 310 is specifically configured as follows:
[0193] According to the functional relationship between the output signals and the input signals of each calculation link of the first filter, the number of weight coefficients is determined by determining the number of input signals related to each output value of the first filter;
[0194] Based on the number of weight coefficients, a weight coefficient matrix of the first filter is obtained, wherein the number of rows of the weight coefficient matrix is the downsampling multiple of the first filter, and the number of columns of the weight coefficient matrix is the order of the first filter.
[0195] Optionally, the fusion coefficient matrix determination module 320 is specifically configured as follows:
[0196] Based on the periodic characteristics of the local oscillator signal, each local oscillator signal is converted into a local oscillator signal vector, wherein the length value of each local oscillator signal vector is the least common multiple of the number of periods of the local oscillator signal and the downsampling multiple of the first filter;
[0197] For each local oscillator signal vector, the local oscillator signal vector is split into N row vectors, each row vector has the same number of elements, and a sub-matrix composed of N row vectors is obtained, and the sub-matrices corresponding to each local oscillator signal vector are spliced by column to obtain a local oscillator signal matrix, wherein N is a positive integer, representing the ratio of the least common multiple of the number of mixing common cycles and the downsampling multiple to the downsampling multiple, and the mixing common cycle is the least common multiple of the cycles of each local oscillator signal;
[0198] Perform vector dot multiplication operation on the local oscillator signal matrix and the weight coefficient matrix, and use the obtained matrix as the fusion coefficient matrix after mixing and filtering fusion.
[0199] Optionally, the input signal matrix corresponding to the input signal to be processed is obtained in the following manner:
[0200] Converting the input signal to be processed into an original input signal matrix, wherein the number of columns of the original input signal matrix is the downsampling multiple of the first filter;
[0201] Based on the periodic characteristics of the local oscillator signal, extracting row vectors every N rows from the original input signal matrix, extracting M times in total, forming an input signal conversion matrix, until the original input signal matrix is traversed to obtain N input signal conversion matrices, where M represents the ratio of the length value of the input signal to be processed to N;
[0202] Accordingly, the mixing and filtering module 330 is specifically configured as follows:
[0203] Perform batch matrix multiplication operation on N input signal conversion matrices and fusion coefficient matrices to obtain a product result;
[0204] The product result is convolved with the set convolution kernel to obtain a signal after mixing filtering, wherein the number of rows and columns of the convolution kernel are both set to the order of the first filter, and one of the diagonal elements of the convolution kernel is set to 1, and the other elements are all set to 0.
[0205] Optionally, the device provided by the embodiment of the present invention further includes:
[0206] The low-pass filtering module is configured to perform low-pass filtering on the signal after the mixing filter to obtain an output signal.
[0207] Optionally, the low-pass filter module is specifically configured as follows:
[0208] Convert the mixed filtered signal into a data signal matrix that meets the tensor core size requirements, and convert the second filter coefficient into a second filter coefficient matrix that meets the tensor core size requirements, wherein the row value of the data signal matrix is the ratio of the input signal length value to the number of columns of the second filter coefficient matrix, the column value of the data signal matrix is equal to the row value of the second filter coefficient matrix, and the second filter coefficient matrix is used to convert the original one-dimensional convolution operation corresponding to the second filter into a matrix multiplication operation of the coefficient matrix and the input signal, and the convolution kernel moves one bit each time during the original one-dimensional convolution operation corresponding to the second filter;
[0209] Performing a matrix multiplication operation on the data signal matrix and the coefficient matrix of the second filter, and expanding the obtained result row by row to form a one-dimensional matrix;
[0210] The first set length elements are extracted from the one-dimensional matrix as the filtering result, wherein the set length is the length of the signal after the mixing filter.
[0211] Optionally, the first filter is any one of the following filters:
[0212] Cascaded integrator comb CIC filter, moving average downsampling filter, weighted sliding average downsampling filter;
[0213] The second filter is: a finite length unit impulse response FIR filter.
[0214] Embodiment 4
[0215] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of a computing device provided in Embodiment 4 of the present invention. Figure 4As shown, the computing device may include:
[0216] A memory 701 storing executable program codes;
[0217] a processor 702 coupled to the memory 701;
[0218] The processor 702 calls the executable program code stored in the memory 701 to execute the tensor core-based mixing filtering method provided by any embodiment of the present invention.
[0219] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the tensor core-based mixing filtering method provided by any embodiment of the present invention.
[0220] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the above-mentioned processes does not mean the necessary order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0221] In the embodiments provided by the present invention, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0222] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0223] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the above methods of various embodiments of the present invention.
[0224] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0225] Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of an embodiment, and the modules or processes in the accompanying drawings are not necessarily required to implement the present invention.
[0226] Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed accordingly and located in one or more devices different from the embodiment. The modules in the above embodiment can be combined into one module, or can be further divided into multiple sub-modules.
[0227] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A mixing filtering method based on tensor kernel, characterized in that: include: Determine a weight coefficient matrix of the first filter according to a functional relationship between an output signal of the first filter and an input signal, wherein the weight coefficient matrix is used to convert an original one-dimensional convolution operation corresponding to the first filter into a matrix multiplication operation of the weight coefficient and the input signal, wherein a stride of the original one-dimensional convolution operation corresponding to the first filter is greater than 1; Performing a matrix-vector dot multiplication operation on the local oscillator signal matrix corresponding to each local oscillator signal by using the weight coefficient matrix, and using the obtained matrix as a fusion coefficient matrix after mixing and filtering fusion; A matrix multiplication operation is performed on an input signal matrix corresponding to the input signal to be processed and the fusion coefficient matrix to perform filtering processing on the input signal.
2. The method according to claim 1, characterized in that The step of determining a weight coefficient matrix of the first filter according to a functional relationship between an output signal of the first filter and an input signal includes: According to the functional relationship between the output signals and the input signals of each calculation link of the first filter, the number of weight coefficients is determined by determining the number of input signals related to each output value of the first filter; Based on the number of weight coefficients, a weight coefficient matrix of the first filter is obtained, wherein the number of rows of the weight coefficient matrix is the downsampling multiple of the first filter, and the number of columns of the weight coefficient matrix is the order of the first filter.
3. The method according to claim 1 or 2, characterized in that: The step of performing a matrix-vector dot multiplication operation on the local oscillator signal matrix corresponding to each local oscillator signal by using the weight coefficient matrix, and using the obtained matrix as a fusion coefficient matrix after mixing and filtering fusion, comprises: Based on the periodic characteristics of the local oscillator signal, each local oscillator signal is converted into a local oscillator signal vector, wherein the length value of each local oscillator signal vector is the least common multiple of the number of periods of the local oscillator signal and the downsampling multiple of the first filter; For each local oscillator signal vector, split the local oscillator signal vector into N row vectors, each row vector has the same number of elements, and obtain a sub-matrix composed of N row vectors, and splice the sub-matrices corresponding to each local oscillator signal vector by column to obtain a local oscillator signal matrix, wherein N is a positive integer, representing the ratio of the least common multiple of the number of mixing common periods and the downsampling multiple to the downsampling multiple, and the mixing common period is the least common multiple of the periods of each local oscillator signal; A vector dot multiplication operation is performed on the local oscillator signal matrix and the weight coefficient matrix, and the obtained matrix is used as a fusion coefficient matrix after mixing and filtering fusion.
4. The method according to claim 3, characterized in that The input signal matrix corresponding to the input signal to be processed is obtained in the following way: Converting the input signal to be processed into an original input signal matrix, wherein the number of columns of the original input signal matrix is the downsampling multiple of the first filter; Based on the periodic characteristics of the local oscillator signal, extracting row vectors every N rows from the original input signal matrix, extracting M times in total, forming an input signal conversion matrix, until all row vectors of the original input signal matrix are traversed to obtain N input signal conversion matrices, where M represents the ratio of the length value of the input signal to be processed to N; Correspondingly, performing a matrix multiplication operation on the input signal matrix corresponding to the input signal to be processed and the fusion coefficient matrix includes: Performing batch matrix multiplication operation on N input signal conversion matrices and the fusion coefficient matrix to obtain a product result; The product result is convolved with a set convolution kernel to obtain a signal after mixing filtering, wherein the number of rows and columns of the set convolution kernel are both the order of the first filter, and one of the diagonal elements of the set convolution kernel is 1, and the other elements are all 0.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The signal after the mixing and filtering is subjected to low-pass filtering to obtain an output signal.
6. The method according to claim 5, characterized in that The low-pass filtering of the mixed and filtered signal comprises: Converting the mixed and filtered signal into a data signal matrix that meets the tensor core size requirements, and converting the second filter coefficient into a second filter coefficient matrix that meets the tensor core size requirements, wherein the number of rows of the data signal matrix is the ratio of the input signal length value to the number of columns of the second filter coefficient matrix, the number of columns of the data signal matrix is equal to the number of rows of the second filter coefficient matrix, and the second filter coefficient matrix is used to convert the original one-dimensional convolution operation corresponding to the second filter into a matrix multiplication operation of the coefficient matrix and the input signal, and the convolution kernel moves one bit each time during the original one-dimensional convolution operation corresponding to the second filter; Performing a matrix multiplication operation on the data signal matrix and the coefficient matrix of the second filter, and expanding the obtained result row by row to form a one-dimensional matrix; The first set length elements are extracted from the one-dimensional matrix as filtering results, wherein the set length is the length of the signal after mixing and filtering.
7. The method according to claim 6, characterized in that The first filter is any one of the following filters: Cascaded integrator comb CIC filter, moving average downsampling filter, weighted sliding average downsampling filter; The second filter is a finite-length unit impulse response (FIR) filter.
8. A mixing filter device based on tensor core, characterized in that: include: A weight coefficient matrix determination module is configured as a functional relationship between an output signal and an input signal of the first filter, and determines a weight coefficient matrix of the first filter, wherein the weight coefficient matrix is used to convert an original one-dimensional convolution operation corresponding to the first filter into a matrix multiplication operation of the weight coefficient and the input signal, wherein the stride of the original one-dimensional convolution operation corresponding to the first filter is greater than 1; A fusion coefficient matrix determination module is configured to perform a matrix-vector dot multiplication operation on the weight coefficient matrix and the local oscillator signal matrix corresponding to each local oscillator signal, and use the obtained matrix as a fusion coefficient matrix after mixing and filtering fusion; The mixing filter module is configured to perform a matrix multiplication operation on an input signal matrix corresponding to the input signal to be processed and the fusion coefficient matrix to perform filtering processing on the input signal.
9. A computing device, characterized in that The computing device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the tensor core-based mixing filtering method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the mixing filtering method based on tensor cores as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Calculation method and calculation device
CN109063822A
Convolutional neural network operation acceleration method and device based on many-core processor
CN111461311A
Digital down-conversion method of parallel structure
CN111786690A
Method and computing system for reconfigurable architecture based on GPGPU
CN113076521A
Convolution operation method and device, convolution processing method, equipment and storage medium
CN115563443A
Cited By
Mixer behavior level modeling method and device, storage medium and program product
CN121168010A