Data processing device and method
By shifting the floating point matrix elements and converting them into fixed-point numbers less than or equal to 1, the problem of high hardware resource consumption in floating point matrix operations is solved, and resource saving and computational complexity are achieved.
Patent Information
- Application Number
- CN202210356703.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-06
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-04-06
AI Technical Summary
When performing floating-point matrix operations, existing data processing equipment needs to consume high hardware resources and has high computational complexity, making it difficult to effectively reduce hardware resource consumption.
By performing shift operations on floating point matrix elements, converting them into fixed-point numbers less than or equal to 1, removing the exponential bits of fixed-point numbers, reducing the overall bit width of the data, thereby saving hardware resources.
It effectively reduces the hardware resource consumption of floating-point matrix operations, reduces the computational complexity, and saves hardware resources on the basis of ensuring accuracy.
Smart Images

Figure CN114780912B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a data processing device and method. Background Art
[0002] Due to the high complexity of floating-point operations, data processing devices usually convert floating-point numbers into fixed-point numbers for operations. In order to ensure the calculation accuracy, the bit width of the calibration in the existing floating-point fixed-point method is relatively wide, which requires high hardware resources. Summary of the invention
[0003] In view of this, the present application provides a data processing device and method to reduce the hardware resource consumption of floating-point matrix operations.
[0004] In a first aspect, a data processing device is provided, comprising: a memory for storing a first matrix; a processor for performing the following operations: reading the first matrix from the memory; performing a shift operation on elements in the first matrix to obtain a second matrix, wherein the elements in the second matrix are all fixed-point numbers with values less than or equal to 1, and the bit width of the exponent bits of the elements in the second matrix is zero.
[0005] In a second aspect, a data processing method is provided, comprising: reading a first matrix from a memory; performing a shift operation on elements in the first matrix to obtain a second matrix, wherein the elements in the second matrix are all fixed-point numbers with values less than or equal to 1, and the bit width of the exponent bits of the elements in the second matrix is zero.
[0006] In the embodiment of the present application, by performing a shift operation on the floating-point matrix elements, the elements in the matrix are all converted into fixed-point numbers less than or equal to 1. Because the elements in the matrix elements are all less than or equal to 1, when calibrating the new matrix elements, the exponent bits of the fixed-point numbers can be removed to reduce the overall bit width of the data, thereby saving hardware resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application.
[0008] Figure 2 A flowchart of a data processing method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0009] The technical solutions in the embodiments of the present application are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0010] A floating point number is a number in which the position of the decimal point is not fixed but can float. The floating point standard, also known as the Institute of Electrical and Electronics Engineering (IEEE) Standard for Binary Floating Point Arithmetic (IEEE 754), has been the most widely used floating point arithmetic standard since the 1980s and is adopted by many data processing devices. This standard defines the format for representing floating point numbers. A floating point number is a number in which all binary bits of a continuous byte of a specific length are divided into three domains of a specific width: the sign domain, the exponent domain, and the mantissa domain. The values stored in the domains are used to represent the sign, exponent, and mantissa of a given binary floating point number. In this way, the given value can be expressed by the mantissa and the adjustable exponent (hence the name "floating point"), and two basic floating point formats are given: single precision and double precision. The single precision format has 24 bits of significant digits (i.e., mantissa) precision, occupying a total of 32 bits; the double precision format has 53 bits of significant digits (i.e., mantissa) precision, occupying a total of 64 bits.
[0011] Fixed-point numbers are numbers in which the decimal point position of all data in the machine is fixed. Fixed-point data is usually represented as pure decimals or pure integers. In order to represent data as pure decimals, the decimal point is usually fixed before the highest digit of the numerical part; and in order to represent the number as a pure integer, the decimal point is fixed at the end of the numerical part, and the decimal point is not represented in the machine, but is agreed in advance at a fixed position.
[0012] The cost of supporting floating-point operations for data processing devices is high, and not supporting floating-point operations will halve the complexity of data processing device design. Although some data processing devices have integrated floating-point units (FPUs) specifically for floating-point operations, the operating efficiency of floating-point numbers is lower than that of fixed-point numbers.
[0013] Data processing devices generally support fixed-point operations, so floating-point numbers are usually converted to fixed-point numbers (a process called fixed-point conversion) before participating in operations.
[0014] In floating-point operations, floating-point matrix operations are more complex. Data processing in many fields often requires operations on floating-point matrices, such as speech and image processing, neural networks, wireless communications, etc. In floating-point matrix operations, the multiplication of multiple floating-point matrices is more complex and requires high hardware resources. Therefore, floating-point matrices are usually converted to fixed-point before being used in operations.
[0015] Fixed-point conversion includes fixed-point and calibration. Calibration is to determine the total bit width, exponent bit width and decimal bit width of the data. For example, the calibration representation method in the complex domain is CS16_9, where CS represents the complex number, 16 represents the total bit width, the highest bit is the sign bit, 9 represents the decimal bit width, and the exponent bit width is 6 bits. The total bit width of the data represents the hardware resources required for the data processing device to store and / or process the data. The exponent bit width represents the data range that can be represented by the calibration method. For example, the exponent bit width is N, and the data range that can be represented is 0 to 2. N The decimal place width indicates the precision of the data. The larger the decimal place width, the more significant digits can be retained and the higher the precision.
[0016] The following takes the case where the data processing device is a baseband chip and the operation performed by the baseband chip is the calculation of the channel correlation matrix in wireless communication as an example to explain in more detail the problems existing in floating-point matrix operations in the related art.
[0017] For ease of understanding, before introducing the calculation of the channel correlation matrix in wireless communication, a brief introduction to the related concepts of the channel correlation matrix in wireless communication is first given.
[0018] In wireless communications, the channel correlation matrix is used to estimate the channel state information (CSI). For example, the channel correlation matrix can be used to calculate data such as beam power, precoding matrix indicator (PMI) and eigenvalues, which characterize the characteristics of the channel. The estimation of the channel state can be achieved through the following process: First, the base station can send predetermined test information to the UE. Then, the UE calculates the channel correlation matrix by comparing the received information with the test information, thereby estimating the state of the channel. After obtaining the channel state estimation result, the UE can feed back the estimation result to the base station so that the base station can refer to the feedback information for resource scheduling and decision-making on the information transmission plan.
[0019] The calculation of the channel correlation matrix plays a very important role in the communication process. The calculation expression of the channel correlation matrix is:
[0020] R=(HW) H (HW)
[0021] Where H represents the channel impulse response and W represents the precoding matrix.
[0022] With the evolution of communication technology, channel capacity has been greatly improved. Precoding technology is a key technology to improve the capacity and performance of MIMO wireless communication systems. Precoding technology can reduce the interference generated during signal transmission in MIMO wireless communication systems and obtain better signal transmission quality. At present, most wireless communication solutions use precoding matrices to preprocess the transmitted signals. In such solutions, the precoding matrix needs to be added to the calculation of the channel transmission matrix for operation.
[0023] The set of precoding matrices is called a codebook. There are many types of codebooks depending on factors such as the communication method. In the calculation of the channel correlation matrix, the channel impulse response is operated with each candidate precoding matrix in the predetermined codebook to select the precoding matrix most suitable for the channel. At the same time, the PMI is generated to indicate the position of the most suitable precoding matrix in the codebook.
[0024] According to different candidate precoding matrices, the calculation of the channel correlation matrix can be divided into two methods. In the first method, the precoding matrix of each sampling point in the subband uses the same precoding matrix. The first method can be applied to the codebooks of NRTypeI and LTE. In the second method, each sampling point in the subband can use a different candidate precoding matrix. The second method can be applied to NRTypeII and eTypeII codebooks.
[0025] The following is an example to illustrate the detailed calculation process of the above two calculation methods.
[0026] The first calculation method is as follows:
[0027] Step 1: Calculate the subband channel correlation matrix
[0028]
[0029] In the formula, R sb is the subband channel bandwidth matrix, with dimensions of P×P, N j is the number of sample values in each subband, H k is the channel impulse response of sample point k, with dimensions of Q×P, where Q is the number of receiving antennas and P is the number of CSI-RS ports, and is calibrated to CS16_9. The CS40_18 calibration value is used in the multiplication and accumulation process, and the final subband channel bandwidth matrix calibration value is CS32_18.
[0030] Step 2: Calculate the wideband channel correlation matrix
[0031]
[0032] In the formula, R wb,corr is the wideband channel correlation matrix, N sample is the number of sample values reported within the full bandwidth, J is the number of subbands, and R sb,j is the channel correlation matrix of the j-th subband, B j is the number of sample values in the jth subband. The calibration value of the wideband correlation matrix is CS32_18 after accumulating and averaging the subband channel correlation matrices.
[0033] Step 3: Filter using Kalman filter
[0034] R wb,corr =(1-α)R wb,corr (t-1)+αR wb,corr (t)
[0035] Where α is the filter factor, R wb,corr (t-1) is the historical value of the wideband channel correlation matrix, R wb,corr (t) represents the current value of the wideband channel correlation matrix.
[0036] A one-dimensional Kalman filter is usually used for filtering. By introducing the value of the channel correlation matrix at the previous moment with weighted method, the noise of the channel correlation matrix at the current moment is removed. This filtering method can not only filter out the noise of the test signal, but also determine the optimal estimate at the current moment by combining previous estimates.
[0037] Step 4: R wb,corr (t) is multiplied by the candidate precoding matrix W to obtain the equivalent wideband channel correlation matrix
[0038]
[0039] The dimension of W is P×v, where v is the number of layers.
[0040] Through the above steps Step 1 to Step 4, the equivalent wideband channel correlation matrix is finally calculated, and the calibration value of the equivalent wideband channel correlation matrix can be set to CS32_18.
[0041] The channel impulse response of the sampling point is calibrated to CS16_9, and the subband channel correlation matrix is obtained by calculating the channel impulse response of the sampling point. This operation process includes the multiplication of two matrices. Since each element of the result matrix of the matrix multiplication is obtained through multiple multiplication and accumulation operations, it is easy to overflow under the original calibration value. Therefore, a larger calibration value is usually used in the matrix multiplication process to ensure the accuracy of the operation result. For example, the calibration value of CS40_18 is used in the operation process here. The final subband channel bandwidth matrix calibration value is CS32_18. The calibration value of the wideband correlation matrix is CS32_18. The calibration value of the equivalent wideband channel correlation matrix is CS32_18.
[0042] The second calculation method of the equivalent channel correlation matrix is as follows:
[0043] Step 1: Calculate the equivalent channel
[0044]
[0045] Among them, H k is the channel impulse response for each sample point, with a dimension of Q × P. W is the precoding matrix corresponding to the sample point, with a dimension of P × v, where v is the number of layers. is the equivalent channel matrix of the sample point, with a dimension of Q×v. Step 2: Calculate the channel correlation matrix of each sample point
[0046]
[0047] Where R corr,k is the channel correlation matrix of sample point k.
[0048] The calibration method of this method is similar to the calibration method of the first calculation method, and the calibration value of the channel correlation matrix of each sample point can be set to CS32_18.
[0049] In the above two calculation methods, the total bit width of the maximum calibration value of the calculation process is 40 bits, and the total bit width of the calibration value of the final channel correlation matrix is 32 bits. Whether running the above calculation process or storing the final calculation result, it requires high hardware resources and has high implementation complexity.
[0050] In order to solve the above problems, the embodiments of the present application provide a data processing device and method, which converts matrix elements into numbers less than or equal to 1 through shift operations. When calibrating data, the exponent bits can be removed to reduce the overall bit width of the data, thereby reducing the computational complexity and saving hardware resources.
[0051] Figure 1 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application. Figure 1The data processing device 100 shown may be any type of data processing device that supports matrix operations. In some embodiments, the data processing device 100 may be a data processing device in a wireless communication device. For example, the data processing device 100 may be a baseband chip. In other embodiments, the data processing device 100 may also be an image processor, an NPU, etc.
[0052] See also Figure 1 The data processing device 100 provided in the embodiment of the present application includes a memory 110 and a processor 120. The functions and implementation methods of each component of the data processing device 100 are described in detail below.
[0053] The memory 110 can be used to store instructions so that the processor 120 can call them. In some embodiments, the memory 110 can also be used to store data of the matrix to be processed (such as binary data). Taking the data processing device 100 as a chip as an example, the memory 110 can be an on-chip memory or an off-chip memory. As an example, if the data processing device 100 is a baseband chip, the memory 110 can store matrices involved in the channel correlation matrix operation process. For example, the matrix may include one or more of the broadband channel correlation matrix, the subband channel correlation matrix, and the channel correlation matrix corresponding to the sampling points in the subband mentioned above. For the convenience of description, the matrix data to be processed stored in the memory 110 is referred to as the first matrix below.
[0054] The processor 120 can read the first matrix from the memory 110 and process the first matrix. For example, the processor 120 can perform a shift operation on the data in the matrix, or the processor 120 can perform fixed-point processing on the floating-point data, or the processor 120 can perform operations such as matrix multiplication on the matrix stored in the memory. Taking the data processing device 100 as a baseband chip as an example, the processor 120 can be, for example, a processor of the baseband chip (i.e., a baseband processor).
[0055] In some embodiments, the processor 120 may perform a shift operation (such as a left shift operation) on the elements in the first matrix to obtain a second matrix. The shift operation may make the elements in the second matrix all numbers with values less than or equal to 1. In other words, through the shift operation, the elements in the first matrix are all converted into fixed-point numbers less than or equal to 1, thereby converting the first matrix into the second matrix.
[0056] Since the elements in the second matrix are all fixed-point numbers with values less than or equal to 1, when calibrating the elements in the second matrix, the exponent bits of the fixed-point numbers can be removed, and only the decimal places and the sign bits are retained. In other words, the elements in the second matrix can be calibrated so that the bit width of the exponent bits of the elements in the second matrix is zero. Taking complex number calibration as an example, if the calibration value of the first matrix is CS32_18, the elements of the second matrix obtained by the shift operation are all numbers with values less than or equal to 1, so that the calibration value of the second matrix element can be set to CS16_15. In this calibration method, the total bit width of the data is 16 bits, and except for one bit being the sign bit, the remaining 15 bits are all decimal places. It can be seen that by using the processor 120 to perform the above operations, the overall bit width of the data can be reduced by half, and at the same time, the decimal places can be maximized when the total bit width is small, which can save the bit width, thereby saving hardware resources, and not losing too much precision.
[0057] As mentioned above, the shift amount of the shift operation can be set in a variety of ways. As an implementation, the shift amount of the shift operation can be set according to the value of the exponent bit of the element with the largest value in the first matrix. As another implementation, the shift amount of the shift operation can be set according to the bit width of the exponent bit of the element in the first matrix. The above two possible implementations are described in detail below in conjunction with specific embodiments.
[0058] Implementation method 1: Set the shift bit of the shift operation according to the value of the exponent bit of the element with the largest value in the first matrix. Position
[0059] As an example, the first matrix is a channel correlation matrix of a single sample point (the candidate precoding matrix is the same at each sample point), and its calculation expression is as follows:
[0060] R corr,k =(H k ) H ·(H k )·(2 -shiftbit )
[0061] First, traverse all elements of the channel correlation matrix of sample point k, find the largest element in the matrix and obtain the value of the exponent bit of the element. Secondly, the shift amount (shiftbit) of the shift operation can be set equal to the value of the exponent bit of the element with the largest value in the first matrix. Finally, perform a shift operation on all elements of the channel correlation matrix of sample point k to obtain R corr,k (ie the second matrix).
[0062] Through the above operation, R corr,k All elements in are fixed-point numbers less than 1 or equal to 1, so the matrix exponent width can be set to zero. For example, R corr,kThe calibration value is set to CS16_15. In the above calculation expression, 2 -shiftbit is the mathematical representation of the shift operation.
[0063] As another example, the first matrix is a subband channel correlation matrix, and its calculation expression is as follows:
[0064]
[0065] First, traverse all elements in the subband channel correlation matrix, find the maximum element in the matrix and obtain the value of the index bit of the maximum element. Secondly, the shift amount (shiftsb) of the shift operation can be set equal to the value of the index bit of the maximum element. Finally, perform a shift operation on all elements of the subband channel correlation matrix to obtain R sb (ie the second matrix).
[0066] Through the above operation, R sb All elements in are fixed-point numbers less than 1 or equal to 1, so the matrix exponent width can be set to zero. For example, R sb The calibration value is set to CS16_15. In the above calculation expression, 2 -shiftsb is the mathematical representation of the shift operation.
[0067] As another example, the first matrix may be a wideband channel correlation matrix, and its calculation expression is as follows:
[0068]
[0069] First, traverse all elements in the wideband channel correlation matrix, find the maximum element in the matrix and obtain the value of the exponent bit of the maximum element. Secondly, the shift amount (shiftwb) of the shift operation can be set equal to the value of the exponent bit of the maximum element. Finally, perform a shift operation on all elements of the wideband channel correlation matrix to obtain R wb,corr (ie the second matrix).
[0070] Through the above operation, R wb,corr All elements in are fixed-point numbers less than 1 or equal to 1, so the matrix exponent width can be set to zero. For example, R wb,corr The calibration value is set to CS16_15. In the above calculation expression, 2 -shiftwb is the mathematical representation of the shift operation.
[0071] In order to improve the accuracy of the data, the total bit width is expected to be as large as possible during data calibration, but in order to save hardware resources, the total bit width is expected to be as small as possible during data calibration. Therefore, it is often impossible to balance the accuracy and the consumed hardware resources during data calibration.
[0072] The value of the exponent bit of the largest element in the matrix is used as the shift amount of the shift operation, and the shift operation is performed on the channel correlation matrix of a single sample point, the subband channel correlation matrix, and the wideband channel correlation matrix. This operation converts all elements of the matrix into numbers with values less than or equal to 1, thereby reducing the total bit width of the calibration from the 32 bits mentioned above to 16 bits. This method greatly reduces the bit width occupied by the data and saves the hardware resources required for processing data. In addition, the value of the exponent bit of the largest element in the matrix is obtained by traversing the matrix elements after the operation is completed. Using the value of the exponent bit of the largest element in the matrix as the shift amount of the shift operation is simple and easy to implement.
[0073] In addition, the decimal places are reduced from 18 to 15. Although there is a slight loss in data accuracy, the impact on the channel state estimation result is small and within the allowable range. The errors of the data processing device and method provided by the present application and the related technology are explained by simulation results in the following text and will not be described in detail here.
[0074] Implementation method 2: Based on the bit width of the exponent bit of the element in the first matrix (for the convenience of description, the bit width will be The width is called the first bit width) sets the shift amount of the shift operation
[0075] In some embodiments, the first matrix is a result matrix obtained after performing a matrix multiplication operation on multiple matrices. The value of each element of the first matrix needs to perform multiple multiplication and accumulation operations. Therefore, the elements in the first matrix are usually much larger than the elements of the matrix performing the multiplication operation. Overflow occurs when the value of the matrix element exceeds the range that the calibration value can represent. For example, the calibration value is that the data range that CS16_15 can represent is 0 to 1. When the element of the result matrix is greater than 1, overflow will occur when the original calibration value is used. At this time, the data that exceeds the range represented by the calibration value will be lost, resulting in data errors.
[0076] In order to avoid this situation, when performing a matrix multiplication operation, the bit width of the exponent bit of the first matrix element can be set to the first bit width, that is, the minimum bit width required to avoid overflow of the matrix multiplication operation. The first bit width can be determined according to a target parameter. The target parameter can be of various types. For example, the target parameter can be the number of multiplication and accumulation operations required to be performed to determine the value of an element in the first matrix using a matrix multiplication operation. After the calculation is completed, the shift amount of the shift operation is set according to the first bit width, and the shift operation is performed to obtain a second matrix. For example, the shift amount can be greater than or equal to the value of the first bit width. The elements in the second matrix are all fixed-point numbers with values less than or equal to 1, so the bit width of the exponent bit of the elements in the second matrix is set to zero.
[0077] As an example, the first matrix may be an equivalent wideband channel correlation matrix, and its calculation expression is as follows:
[0078]
[0079] The equivalent bandwidth channel correlation matrix is the result matrix after matrix multiplication of three matrices. The three matrices are the conjugate transposed matrix of the precoding matrix, the filtered wideband channel correlation matrix, and the precoding matrix. The following description is based on the example that the above three matrices are all calibrated to CS16_15.
[0080] It should be noted that in the calculation formula of the equivalent wideband channel correlation matrix, the precoding matrix W has a normalization coefficient (not marked in the above formula), where P is the number of CSI-RS ports and v is the number of layers. H is the transposed conjugate matrix of the precoding matrix, so the coefficients are the same as W. H The coefficient scale of W is taken out to get R wb,corr The coefficient is 1 / (Pv).
[0081] The condition for two matrices to be multiplied is that the number of rows of the first matrix is equal to the number of columns of the second matrix. According to the rules of matrix multiplication, the elements of the result matrix are equal to the multiplication and addition of the row elements of the first matrix and the column elements of the second matrix. Therefore, the number of rows of the first matrix determines the number of multiplications and additions in the calculation process of each element of the result matrix.
[0082] W H The matrix dimensions are v×P, R wb,corr (t) The matrix dimension is P×P, and the matrix dimension of W is P×v. According to the above analysis, W H ·R wb,corr (t) The number of multiplication and accumulation operations that need to be performed on each element of the new matrix after multiplication is P. Since the maximum value of two numbers with calibration values of CS16_15 (i.e., numbers less than or equal to 1) is less than or equal to 1 after multiplication, then W H ·R wb,corr The maximum possible value of each element of (t) is P. Similarly, we can know that W H ·R wb,corr The maximum possible value of (t)·W is P×P. Combined with R wb,corr The coefficient of 1 / (Pv), we know that R wb,corr The maximum possible value of is P×P÷(Pv), that is, P / v.
[0083] Converting the maximum possible value of the matrix into a binary fixed-point number, we can get the first bit width (adaptshiftbit) as ceil(log2(P / v)). Among them, ceil is a round-up function, and the function value is the smallest integer greater than the value in the brackets. Because the exponent bit width is an integer, the ceil function is used to round up the calculated value. At the same time, the ceil function can ensure that when the matrix elements are represented as fixed-point data, the decimal part is less than or equal to 1.
[0084] In order to avoid data overflow during the operation, the exponent bit width of the equivalent bandwidth channel correlation matrix is set to the first bit width during the matrix multiplication operation.
[0085] After the calculation is completed, the shift amount of the shift operation is set according to the first bit width. For example, the shift amount of the shift operation is set equal to the value of the first bit width. The shift operation is performed so that R wb,corr The values of all matrix elements are less than or equal to 1. wb,corr When scaling matrix elements, you can set the exponent bit width to zero. For example, you can set the scaling value to CS16_15.
[0086] As another example, the first matrix is the channel correlation matrix R corresponding to the sampling points in the subband corr,k (The precoding matrix of each sampling point is different), and its calculation expression is as follows:
[0087]
[0088] In the above formula, is an equivalent channel, and its calculation expression is as follows:
[0089]
[0090] Among them, H k The dimension is Q×P, the dimension of W is P×v, and the calibration values are both CS16_15 for illustration.
[0091] Similarly, W has a coefficient The number of multiplication and accumulation operations required to obtain the value of an element in the equivalent channel matrix is P, then The maximum possible value of a matrix element is
[0092] Converting the maximum possible value into a binary fixed-point number, we can get its exponent bit width as Based on the exponent width of the maximum possible value, the minimum exponent width to avoid overflow can be determined as When calibrating the equivalent channel matrix, Set to the exponent bit width. Taking the total bit width of 16 bits as an example, the fraction bit width adaptbit = 15-ceil(log2(P / (2v))), that is, the equivalent channel The calibration value is CS16_adaptbit.
[0093] The transposed conjugate of a matrix has the same elements as the original matrix, but the elements are in different positions. The exponent width is Therefore, the exponential width of the transposed conjugate matrix of the equivalent channel is also According to the inherent characteristics of matrix multiplication, when and Multiply, the exponent width of the result matrix is equal to The bit width and The sum of the bit widths ensures that all elements do not overflow.
[0094] Therefore, in order to avoid R corr,k Data overflow of matrix elements in R corr,k During calculation, the exponent width is set to
[0095] After the calculation is completed, adaptshiftbit is used as the shift amount to perform the shift operation so that R corr,k The values of all matrix elements are less than or equal to 1. corr,k When scaling matrix elements, you can set the exponent bit width to zero. For example, you can set the scaling value to CS16_15.
[0096] In the process of matrix multiplication, the original calibration value may overflow due to the large number of multiplication and accumulation. To avoid this, when performing the matrix multiplication operation, the bit width of the exponent bit of the first matrix element may be set to the first bit width, that is, the minimum bit width required to avoid overflow of the matrix multiplication operation.
[0097] After the calculation is completed, the shift amount of the shift operation is set according to the first bit width, and the shift operation is performed to obtain the second matrix. The values of the elements in the second matrix are all fixed-point numbers less than or equal to 1, so when calibrating the second matrix, the exponent bit width can be set to zero, thereby reducing the calculation complexity and saving hardware resources.
[0098] By setting the shift amount of the shift operation according to the first bit width, the value of the first bit width can be determined before matrix operation. And the first bit width value can be used as the exponent bit width value for calibration during the operation and the shift amount of the shift operation after the operation.
[0099] Combination of the above Figure 1 The device embodiment of the present application is described in detail. Figure 2 , the method embodiment of the present application is described in detail. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment, so the parts not described in detail can refer to the previous device embodiment.
[0100] Figure 2 It is a flowchart of a data processing method 200 provided in an embodiment of the present application.
[0101] The data processing method 200 includes steps S210 and S220, wherein:
[0102] S210, reading a first matrix from a memory;
[0103] S220, performing a shift operation on the elements in the first matrix to obtain a second matrix, wherein the elements in the second matrix are all fixed-point numbers with values less than or equal to 1, and the bit width of the exponent bits of the elements in the second matrix is zero.
[0104] Optionally, a shift amount of the shift operation is greater than or equal to a first value, and the first value is equal to a value of an exponent bit of a maximum value in the first matrix.
[0105] Optionally, the first matrix is a result matrix obtained after performing a matrix multiplication operation on multiple matrices, the bit width of the exponent bits of the elements in the first matrix is the first bit width, the first bit width is the minimum bit width required to avoid overflow of the matrix multiplication operation, and the shift amount of the shift operation is greater than or equal to the first bit width.
[0106] Optionally, the first bit width is determined based on a target parameter, where the target parameter represents the number of multiplication-accumulation operations required to be performed to determine a value of an element in the first matrix using a matrix multiplication operation.
[0107] Optionally, the first matrix is an equivalent wideband channel correlation matrix R wb,corr , where R wb,corr =W H ·R wb,corr (t)·W·2 -adaptshiftbit , W represents the precoding matrix, R wb,corr (t) represents the wideband channel correlation matrix, adaptshiftbit represents the first bit width, adaptshiftbit=ceil(log2(P / v)), ceil() represents rounding up, P represents the number of CSI-RS ports, and v represents the number of layers.
[0108] Optionally, the first matrix is the channel correlation matrix R corresponding to the sampling points in the subband corr,k ,in, represents the equivalent channel matrix corresponding to the sampling point, adaptshiftbit represents the first bit width, adaptshiftbit=ceil(log2(P / v)), ceil() represents rounding up, P represents the number of CSI-RS ports, v represents the number of layers, The exponent width of the elements in is ceil(log2(P / 2v)).
[0109] Optionally, the first matrix is a channel correlation matrix.
[0110] Optionally, the channel correlation matrix is one of the following: a wideband channel correlation matrix, a subband channel correlation matrix, and a channel correlation matrix corresponding to sampling points in a subband.
[0111] The embodiments of the present application are described in more detail below in conjunction with specific examples. It should be noted that the examples of the two methods for calculating the channel correlation matrix are only intended to help those skilled in the art understand the embodiments of the present application, and are not intended to limit the embodiments of the present application to the specific values or specific scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the examples of the two methods for calculating the channel correlation matrix given, and such modifications or changes also fall within the scope of the embodiments of the present application.
[0112] Example 1:
[0113] Example 1 describes the channel correlation matrix calculation method applicable to NR Type 1 and LTE codebooks. The candidate precoding matrix is the same at each sample point, and the channel correlation matrix of the entire broadband needs to be calculated. The specific implementation scheme is as follows:
[0114] Step 1: Calculate the channel correlation matrix of a single sample point
[0115] R corr,k =(H k ) H ·(H k )·(2 -shiftbit )
[0116] R corr,k is the channel correlation matrix of sample point k, H k is the channel impulse response of sample point k, with dimension Q×P and calibration value CS16_9. Traverse all elements of the matrix to find the largest element, and obtain the exponent bit value (first value) of the element. Use the first value as the shift amount (i.e., shiftbit) of the shift operation to perform a shift operation on all elements of the matrix. At this time, all elements of the matrix are numbers less than or equal to 1, and the exponent bit width can be set to zero. For example, the calibration value is set to CS16_15.
[0117] Step 2: Calculate the subband channel correlation matrix
[0118]
[0119] In the formula, R sb is the subband channel correlation matrix, N j is the number of sample values in each subband. corr,k The subband channel correlation matrix obtained by cumulative averaging. The first value is equal to the value of the exponent bit of the largest element of the matrix. The first value is used as the shift amount of the shift operation (i.e., shiftsb) to perform a shift operation on all elements of the matrix. At this time, the elements of the matrix are all numbers less than or equal to 1, and the exponent bit width can be set to zero. For example, the calibration value is set to CS16_15.
[0120] Step 3: Calculate the wideband channel correlation matrix
[0121]
[0122] In the formula, R wb,corr is the wideband channel correlation matrix, N sample is the number of sample values reported within the full bandwidth, J is the number of subbands, R sb,j is the channel correlation matrix of the j-th subband, B j is the number of sample values in the jth subband. The index value of the largest element in the wideband channel correlation matrix is used as the shift amount shiftwb for the shift operation. Similarly, the calibration value of the wideband channel correlation matrix can be set to CS16_15.
[0123] Step 4: Filter using Kalman filter
[0124] R wb,corr =(1-α)R wb,corr (t-1)+αR wb,corr (t)
[0125] Where α is the filter factor, R wb,corr (t-1) is the historical value of the wideband channel correlation matrix, R wb,corr (t) represents the current value of the wideband channel correlation matrix, with dimension P×P.
[0126] Step 5: Since the candidate precoding matrices are the same, R wb,corr (t) is multiplied with the candidate precoding matrix W to obtain the equivalent wideband channel correlation matrix, where the dimension of W is P×v and the calibration value is CS16_15.
[0127]
[0128] In order to avoid overflow of the original calibration value, dynamic calibration is performed during the calculation process of matrix multiplication. According to the exponent bit width of the maximum possible value, the minimum exponent bit width can be determined as adaptshiftbit=ceil(log2(P / v)) (see the calculation method above). The value of the first bit width can be greater than or equal to adaptshiftbit. For example, the value of the first bit width in the calculation of the equivalent bandwidth channel correlation matrix is equal to adaptshiftbit.
[0129] After the calculation is completed, adaptshiftbit is used as the shift amount of the shift operation to shift all elements of the matrix. wb,corr The calibration value is set to CS16_15.
[0130] When the data processing device provided in the present application processes the channel correlation matrix, the maximum bit width in the calculation process is reduced from the 40 bits mentioned above to 16 bits, which greatly saves hardware resources while ensuring data accuracy.
[0131] Example 2
[0132] Example 2 describes the channel correlation matrix calculation method applicable to NR Type II and eType II codebooks. When the candidate precoding matrix of each sample point is different, the channel correlation matrix of each sample point needs to be calculated. The specific implementation scheme is as follows:
[0133] Step 1: Calculate the equivalent channel
[0134]
[0135] H k is the channel impulse response for each sample point, with a dimension of Q×P and a calibration value of CS16_15. W is the precoding matrix corresponding to the sample point, with a dimension of P×v, where v is the number of layers and a calibration value of CS16_15. is the equivalent channel matrix of the sample point, with dimension Q×v. The maximum possible value of a matrix element is (The calculation method is as mentioned above.) Convert the maximum possible value into a binary fixed-point number, and its exponent bit width is When scaling the matrix elements, Set to the exponent bit width. Taking the total bit width of 16 bits as an example, the fraction bit width adaptbit=15-ceil(log2(P / (2v))). Therefore, the equivalent channel The calibration value is CS16_adaptbit.
[0136] Step 2: Calculate the channel correlation matrix for each sample point
[0137]
[0138] The exponent bit width of the transposed conjugate matrix of the equivalent channel matrix is the same as the exponent bit width of the equivalent channel matrix, so and The exponent width is According to the inherent characteristics of matrix multiplication, when and Multiply, the exponent width of the result matrix is equal to The bit width and The sum of the bit widths of can ensure that all elements do not overflow. corr,k During calculation, the exponent width is set to
[0139] After the calculation is completed, adaptshiftbit is used as the shift amount for shift operation. wb,corr The calibration value is set to CS16_15.
[0140] By flexibly using the calibration during the calculation process and the shift operation after the calculation, the data bit width can be reduced as much as possible while ensuring the data accuracy, thereby reducing the calculation complexity and saving hardware resources.
[0141] It should be noted that the shift operation mentioned in this application actually changes the value of the matrix element. Therefore, the shift amount will be recorded each time the shift operation is performed, and the shift amount will be passed layer by layer during multi-level calculation. After the calculation is completed, all the shift amounts are restored to the result matrix, which reduces the hardware resource usage during the calculation process and also ensures the authenticity of the calculation results.
[0142] The accuracy of the embodiments of the present application is verified below through simulation results of the channel model.
[0143] For ease of understanding, before introducing the simulation results, a brief introduction to the relevant concepts involved in the simulation results is given.
[0144] The Extended Typical Urban (ETU) channel model is used as the channel model for LTE.
[0145] The 3GPP 38.141 protocol specifies three Tapped Delay Line (TDL) models for Frequency Range 1 (FR1), namely TDLA30, TDLB100 and TDLC300, corresponding to three different mobile scenarios: low speed, medium speed and high speed. Among them, the delay spread (DS) corresponding to TDLA30 is 30ns, and the maximum multipath delay is 290ns; the delay spread corresponding to TDLB100 is 100ns, and the maximum multipath delay is 480ns; the delay spread corresponding to TDLC300 is 300ns, and the maximum multipath delay is 2595ns.
[0146] The suffix low in the model name indicates a channel model with low correlation, and high indicates a channel model with high correlation.
[0147] The beam power value can be calculated through the diagonal elements of the channel correlation matrix, and then the signal-noise ratio (SNR) can be converted. Based on the SNR, the channel capacity value can be obtained according to the Shannon formula. There is a mapping relationship between the channel capacity and the mutual information (MI). According to the MI value, the channel state information such as CQI, RI, and LI that needs to be fed back to the base station can be calculated. Therefore, in the channel model simulation, the error of the prior art solution and the present application is compared by the MI value, and the accuracy of the processing result of the present application is measured by the error value.
[0148] Assume that N sample =52, j=8, of which the first 7 N j =8, the last subband N j =4, P=8, Q=4, v=4. The performance simulation results of the related technology and the data processing device of this application under different channel models are as follows:
[0149]
[0150]
[0151] Table 1 ETUlow model simulation results
[0152] Related technologies corresponding to MI values This application corresponds to the MI value SNR = 15dB, rank = 4 14.99 14.96 SNR = 20dB, rank = 4 20.37 20.34 SNR=26dB, rank=4 27.19 27.16 SNR=30dB, rank=4 30.19 30.17 SNR=35dB, rank=4 31.66 31.66
[0153] Table 2 TDLA30low model simulation results
[0154] Related technologies corresponding to MI values This application corresponds to the MI value SNR = 15dB, rank = 4 13.72 13.70 SNR = 20dB, rank = 4 18.48 18.47 SNR=26dB, rank=4 25.14 25.12 SNR=30dB, rank=4 28.64 28.62 SNR=35dB, rank=4 30.97 30.96
[0155] Table 3 TDLC300Low model simulation results
[0156] Related technologies corresponding to MI values This application corresponds to the MI value SNR = 21dB, rank = 4 13.78 13.80 SNR = 25dB, rank = 4 15.59 15.63 SNR=30dB, rank=4 18.27 18.33 SNR=35dB, rank=4 20.99 21.04
[0157] Table 4 ETUhigh model simulation results
[0158] Related technologies corresponding to MI values This application corresponds to the MI value SNR = 21dB, rank = 4 13.52 13.55 SNR = 25dB, rank = 4 15.56 15.59 SNR=30dB, rank=4 18.70 18.74 SNR=35dB, rank=4 22.21 22.25
[0159] Table 5 TDLA30high model simulation results
[0160]
[0161]
[0162] Table 6 TDLC300high model simulation results
[0163] It can be seen from the above simulation results that the channel correlation matrix calculated using the solution of the present application has a very small error when used to estimate channel state information, but can reduce the calibration bit width from 32 bits to 16 bits, greatly reducing hardware loss and saving hardware resources.
[0164] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0165] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments of the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0166] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0167] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0168] In addition, each functional unit in each embodiment of the present application 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.
[0169] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A baseband chip, characterized in that: include: A memory, used for storing a first matrix; A processor that performs the following operations: Reading a first matrix from the memory, where the first matrix is a channel correlation matrix; Performing a shift operation on the elements in the first matrix to obtain a second matrix, wherein the elements in the second matrix are all fixed-point numbers with values less than or equal to 1, and the bit width of the exponent bits of the elements in the second matrix is zero; The shift amount of the shift operation is greater than or equal to a first value, and the first value is equal to a value of an exponent bit of a maximum value in the first matrix.
2. The baseband chip according to claim 1, characterized in that: The first matrix is a result matrix obtained after a matrix multiplication operation is performed on multiple matrices. The bit width of the exponent bits of the elements in the first matrix is the first bit width. The first bit width is the minimum bit width required to avoid overflow of the matrix multiplication operation. The shift amount of the shift operation is greater than or equal to the value of the first bit width.
3. The baseband chip according to claim 2, characterized in that: The first bit width is determined based on a target parameter, where the target parameter represents the number of multiplication-accumulation operations required to be performed to determine a value of an element in the first matrix using the matrix multiplication operation.
4. The baseband chip according to claim 2, characterized in that: The first matrix is an equivalent wideband channel correlation matrix ,in, , represents the precoding matrix, represents the wideband channel correlation matrix, represents the first bit width, , ceil() means rounding up, P means the number of CSI-RS ports, and v means the number of layers.
5. The baseband chip according to claim 2, characterized in that: The first matrix is the channel correlation matrix corresponding to the sampling points in the subband ,in, , represents the equivalent channel matrix corresponding to the sampling point, represents the first bit width, , ceil() means rounding up, P means the number of CSI-RS ports, v means the number of layers, The exponent width of the elements in is .
6. The baseband chip according to claim 1, characterized in that: The channel correlation matrix is one of the following: a wideband channel correlation matrix, a subband channel correlation matrix, and a channel correlation matrix corresponding to sampling points in a subband.
7. A data processing method, characterized in that: Applied to a baseband chip, the method comprises: Reading a first matrix from a memory of the baseband chip, where the first matrix is a channel correlation matrix; Performing a shift operation on the elements in the first matrix to obtain a second matrix, wherein the elements in the second matrix are all fixed-point numbers with values less than or equal to 1, and the bit width of the exponent bits of the elements in the second matrix is zero; The shift amount of the shift operation is greater than or equal to a first value, and the first value is equal to a value of an exponent bit of a maximum value in the first matrix.
8. The data processing method according to claim 7, characterized in that: The first matrix is a result matrix obtained after a matrix multiplication operation is performed on multiple matrices, the bit width of the exponent bits of the elements in the first matrix is the first bit width, the first bit width is the minimum bit width required to avoid overflow of the matrix multiplication operation, and the shift amount of the shift operation is greater than or equal to the first bit width.
9. The data processing method according to claim 8, characterized in that: The first bit width is determined based on a target parameter, where the target parameter represents the number of multiplication-accumulation operations required to be performed to determine a value of an element in the first matrix using the matrix multiplication operation.
10. The data processing method according to claim 8, characterized in that: The first matrix is an equivalent wideband channel correlation matrix ,in, , represents the precoding matrix, represents the wideband channel correlation matrix, represents the first bit width, , ceil() means rounding up, P means the number of CSI-RS ports, and v means the number of layers.
11. The data processing method according to claim 8, characterized in that: The first matrix is the channel correlation matrix corresponding to the sampling points in the subband ,in, , represents the equivalent channel matrix corresponding to the sampling point, represents the first bit width, , ceil() means rounding up, P means the number of CSI-RS ports, v means the number of layers, The exponent width of the elements in is .
12. The data processing method according to claim 7, characterized in that: The channel correlation matrix is one of the following: a wideband channel correlation matrix, a subband channel correlation matrix, and a channel correlation matrix corresponding to sampling points in a subband.
