QR decomposition method and device suitable for Redcap, electronic equipment and storage medium
Through cordic operation, the imaginary part in the channel matrix is eliminated and the upper triangle matrix R is obtained, which solves the hardware area and power consumption problems caused by the redundant design of the 5G QR decomposition module in Redcap applications, and achieves efficient hardware implementation.
Patent Information
- Application Number
- CN202411846667.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-03-14
AI Technical Summary
The existing 5G QR decomposition modules have redundant designs in Redcap applications, resulting in unsuitable hardware area and power consumption.
The imaginary parts of elements h11 and h21 in the channel matrix are eliminated through cordic operations, leaving only the real parts left, and the real parts of h21 are eliminated through further cordic operations, making it 0, thereby obtaining the upper triangle matrix R.
It realizes efficient QR decomposition of Redcap data, reduces the area and power consumption of hardware, and is suitable for the functional needs of Redcap.
Smart Images

Figure CN119629001A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a QR decomposition method, device, electronic device and storage medium suitable for Redcap. Background Art
[0002] The development of mobile communication systems from the initial 1G to the now highly-anticipated 5G is inseparable from the continuous research of all workers. At present, 5G technology is constantly developing and has been deeply applied to various aspects of social production and management, becoming an important technology closely related to people's daily work and life.
[0003] 5G Lightweight (RedCap) refers to the 5G standard proposed by 3GPP, which is more streamlined than the previously released 5G standard. The emergence of 5G RedCap defines a new, less complex NR (New Radio) device for IoT applications, which can provide faster data transmission speeds than LTE Cat-M (Long Term Evolution Machine Communication) and NB-IoT (Narrowband Internet), but is much simpler and cheaper than the traditional 5G NR equipment currently deployed. Compared with traditional 5G, 5G RedCap has a narrower maximum bandwidth, fewer downlink receiving branches, fewer maximum multiple-input multiple-output (MIMO) layers, lower modulation order, supports half-duplex duplexing, and has lower power consumption.
[0004] With the widespread use of MIMO technology and Orthogonal Frequency Division Multiplexing (OFDM) technology in wireless communication systems, the computational complexity of baseband signal processing algorithms has increased exponentially. In order to communicate reliably with multiple users in the same frequency band at the same time, multi-user MIMO (MU-MIMO) systems have become the preferred solution for various future wireless communication systems. These new technologies have placed extremely high demands on baseband signal processors, especially MIMO technology and MU-MIMO technology, which require baseband signal processors to complete real-time operations of a large number of matrices for the first time.
[0005] For the receiver of baseband signal processing in MU-MIMO wireless communication systems, MIMO signal detection is a very challenging task. MIMO signal detection is used to eliminate interference from other antennas and obtain useful signals for each antenna. Similar to the precoding algorithm, MIMO signal detection is usually divided into linear signal detection algorithms represented by MMSE (minimum mean square error) and nonlinear detection algorithms represented by maximum likelihood detection (MLD) detection. Linear detection algorithms such as zero forcing (ZF) detection and MMSE detection have lower hardware implementation complexity, but their detection performance is limited. Nonlinear MLD signal detection requires calculating the Euclidean distance between the received signal and all possible transmitted signal vectors and searching for the minimum value. MLD signal detection is currently the best performing detection algorithm.
[0006] Regardless of which of the above technologies is chosen for signal detection, in the MIMO scenario, the channel matrix H must first be decomposed through QR (orthogonal triangular matrix) decomposition to decompose the channel matrix H into the product of the orthogonal unitary matrix Q and the upper triangular matrix R, and then channel estimation is performed to obtain the decoding information for final decoding.
[0007] The QR decomposition module is very important in hardware because it involves matrix operations, and it also occupies a large amount of hardware area and power consumption. Traditional 5G requires that the downlink branch supported is generally 4 antennas, and the corresponding number of MIMO layers is also 2 to 4. Therefore, directly using the original solution will cause a large waste of performance and a large area, which does not meet the requirements of Redcap. Compared with traditional 5G, Redcap determines that data transmission can be 1 to 8 transmission antennas and the number of receiving antennas is 1 to 2. Therefore, under any combination of models, the QR decomposition module is either not needed in the hardware, or the QR decomposition module only needs to support a maximum of a 2x2 matrix for QR decomposition. Therefore, although the original 5G QR decomposition module can support the demand, it has many redundant designs and is not friendly to area and power consumption. Summary of the invention
[0008] The present application provides a QR decomposition method, device, electronic device and storage medium suitable for Redcap, which is used to solve the problem in the prior art that when using the 5G QR decomposition module to perform QR decomposition on Redcap data, there are many redundant designs, which are not friendly to area and power consumption.
[0009] In a first aspect, an embodiment of the present application provides a QR decomposition method applicable to Redcap, comprising:
[0010] Get channel matrix After the first cordic operation, the element h11 and h 21 The imaginary part of the element h is eliminated, so that 11 and h 21 Only the real part remains; after the second cordic operation, the element h 21 The real part of the element h is eliminated, so that 21 is 0, thus obtaining an upper triangular matrix R.
[0011] Optionally, it also includes: after the third cordic operation, the element h 22 The imaginary part of the element h is eliminated, so that 22 Only the real part remains, thus obtaining an upper triangular matrix R' which is convenient for subsequent calculations.
[0012] Optionally, the first cordic operation includes:
[0013] The element h in the channel matrix 11 The real part h 11.re and the imaginary part h 11.im Calculate according to the vector mode of cordic operation to get the element h 11 The corresponding angle θ 11 , the element h in the channel matrix 21 The real part h 21.re and the imaginary part h 21.im Calculate according to the vector mode of cordic operation to get the element h 21 The corresponding angle θ 21 ; Calculate the elements of the first row of the matrix H according to the rotation mode of the cordic operation, and the rotation angle is θ 11 , to eliminate the element h 11 The imaginary part h 11.im , and get the new real part h 11.re ', calculate the elements of the second row of the matrix H according to the rotation mode of the cordic operation, and the rotation angle is θ 21 , to eliminate the element h 21 The imaginary part h 21.im , and get the new real part h 21.re ';
[0014] The second cordic operation includes:
[0015] The new real part h 11.re ' and h 21.re 'Calculate according to the vector mode of cordic operation to obtain angle θ0, calculate all elements of the matrix H according to the rotation mode of cordic operation, and rotate by angle θ0 to eliminate element h 21 The real part h 21.re ', that is, element h21 is 0, thus obtaining an upper triangular matrix R.
[0016] Optionally, the third cordic operation includes:
[0017] The elements h in the upper triangular matrix 22 The real part h 22.re and the imaginary part h 22.im Calculate according to the vector mode of cordic operation to get the element h 22 The corresponding angle θ 22 ; Calculate the elements of the second row of the upper triangular matrix according to the rotation mode of the cordic operation, and the rotation angle is θ 22 , to eliminate the element h 22 The imaginary part h 22.im , and get the new real part h 22.re '.
[0018] Optionally, the maximum number of iterations of the cordic operation is determined based on the bit width of the QR decomposition circuit.
[0019] In a second aspect, the embodiment of the present application provides a QR decomposition device suitable for Redcap, comprising:
[0020] Acquisition module, used to obtain the channel matrix
[0021] The first cordic operation module is used to convert the element h 11 and h 21 The imaginary part of the element h is eliminated, so that 11 and h 21 Only the real part remains;
[0022] The second cordic operation module is used to convert the element h into 21 The real part of the element h is eliminated, so that 21 is 0, thus obtaining an upper triangular matrix R.
[0023] Optionally, also include:
[0024] The third cordic operation module is used to convert the element h into 22 The imaginary part of the element h is eliminated, so that 22 Only the real part remains, thus obtaining an upper triangular matrix R' which is convenient for subsequent calculations.
[0025] Optionally, the first cordic operation module is specifically used for:
[0026] The element h in the channel matrix11 The real part h 11.re and the imaginary part h 11.im Calculate according to the vector mode of cordic operation to get the element h 11 The corresponding angle θ 11 , the element h in the channel matrix 21 The real part h 21.re and the imaginary part h 21.im Calculate according to the vector mode of cordic operation to get the element h 21 The corresponding angle θ 21 ; Calculate the elements of the first row of the matrix H according to the rotation mode of the cordic operation, and the rotation angle is θ 11 , to eliminate the element h 11 The imaginary part h 11.im , and get the new real part h 11.re ', calculate the elements of the second row of the matrix H according to the rotation mode of the cordic operation, and the rotation angle is θ 21 , to eliminate the element h 21 The imaginary part h 21.im , and get the new real part h 21.re ';
[0027] The second cordic operation module is specifically used for:
[0028] The new real part h 11.re ' and h 21.re 'Calculate according to the vector mode of cordic operation to obtain angle θ0, calculate all elements of the matrix H according to the rotation mode of cordic operation, and rotate by angle θ0 to eliminate element h 21 The real part h 21.re ', that is, element h 21 is 0, thus obtaining an upper triangular matrix R.
[0029] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0030] The memory is used to store computer programs;
[0031] The processor is used to execute the program stored in the memory to implement the QR decomposition method applicable to Redcap described in the second aspect.
[0032] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the QR decomposition method applicable to Redcap described in the second aspect.
[0033] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art: the method provided by the embodiment of the present application obtains the channel matrix After the first cordic operation, the element h 11 and h 21 The imaginary part of the element h is eliminated, so that 11 and h 21 Only the real part remains; after the second cordic operation, the element h 21 The real part of the element h is eliminated, so that 21 is 0, thus obtaining an upper triangular matrix R. In this way, by performing cordic operations on the elements in the channel matrix, the parameters in the lower right corner of the channel matrix are made 0, and the upper triangular matrix corresponding to the matrix to be decomposed is obtained, thus realizing the QR decomposition of Redcap data. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0036] Figure 1 A schematic diagram of the relationship between trigonometric functions of the cordic principle provided in one embodiment of the present application;
[0037] Figure 2 A flowchart of a QR decomposition method applicable to Redcap provided in one embodiment of the present application;
[0038] Figure 3 A schematic diagram of simulation results of a QR decomposition method applicable to Redcap provided in one embodiment of the present application;
[0039] Figure 4 A schematic diagram of simulation results of a QR decomposition method applicable to Redcap provided in another embodiment of the present application;
[0040] Figure 5 A structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0042] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following explanations.
[0043] Taking 2X2 MIMO as an example, when the receiving matrix received by the user end is y, it can be expressed as:
[0044] y=Hx+n;
[0045] Among them, x represents the original matrix of the transmitter, H is the channel matrix, and n represents the noise. Considering that data transmission needs to go through constellation mapping, there will be real and imaginary data. Therefore, for each parameter in the channel matrix and the receiving matrix in the received signal, there are real and imaginary parts.
[0046] By performing MLD on the received signal, it can be seen that the estimated value x' of the detected transmitter signal x has the following relationship:
[0047] x'=argmin||y-Hx|| 2
[0048] The principle of MLD is to assume that n is the smallest to achieve the MLD operation, perform QR decomposition on the matrix H, and further calculate the above formula to obtain:
[0049] x'=argmin||y-Hx|| 2
[0050] =argmin||y-QRx|| 2
[0051] =argmin||Q T y-Rx|| 2
[0052] Among them, because H is QR decomposed, the obtained Q is a unitary matrix, so in the calculation of argmin, it can be multiplied by its transposed matrix Q TCalculation is performed, and R is an upper triangular matrix, so the operation on x can be performed row by row to obtain the value of x', thereby completing the channel estimation. The above formula changes x based on the calculation requirements, so that The minimum x is x'. Therefore, in the above formula, x refers to the judgment value of the initial estimated value x' (referring to the theoretical value after a certain approximation based on the algorithm in order to participate in the operation), that is, the value of x determines x'.
[0053] It can be seen that QR decomposition is very important in UE, but because it involves many matrix operations and considering that the data in UE are complex, the operation is very complicated, and hardware implementation often leads to a large amount of area and power consumption.
[0054] In order to realize QR decomposition, the coordinate rotation digital calculation method (cordic algorithm) is generally used in hardware.
[0055] Take the 2x2 matrix H as an example:
[0056]
[0057] Among them, h 11 represents the element h in the first row and first column of H 12 represents the element h in the first row and second column of H 21 represents the element h in the second row and first column of H 22 Represents the element in the second row and second column of H.
[0058] If you want to decompose H into Q matrix and R matrix:
[0059] H=Q*R
[0060] So we can consider changing it to:
[0061] Q T *H=R
[0062] Among them, Q is a unitary matrix, Q T is the transpose of the Q unitary matrix. According to the relationship between trigonometric functions, the unitary matrix is expressed as:
[0063]
[0064] Then put it into H, we can get:
[0065]
[0066] From the above relationship, we can know that the desired R here is an upper triangular matrix, that is, the element in the lower right corner is 0, so we can know that: 11 sinθ+h 21 cosθ=0
[0067]
[0068] Through the above operations, determining θ can further obtain the Q and R matrices, thus completing the QR decomposition.
[0069] However, when calculating the angle θ, a square root operation is required, which makes the operation process more complicated and requires a lot of computing power. In addition, in the communication system, the elements of H are all complex numbers, and θ cannot be directly obtained by the above method. Therefore, the principle of cordic operation can be used to estimate the above θ.
[0070] The principle of cordic can be explained by the relationship between trigonometric functions. For details, see Figure 1 .
[0071] Based on the calculation relationship of trigonometric functions, if the initial position point is q0, and I want to get the position point qn by rotating the angle β, then the corresponding trigonometric function calculation is:
[0072]
[0073] Where [x0, y0] represents the initial point q0, and [xn, yn] represents the point qn obtained after rotation. Then for any desired rotation angle β, it can be expressed as:
[0074] β=p0a0+p1a1+..+p i a i +...
[0075] Where p represents a sign number, whose value is +1 or -1, and a represents the rotation angle corresponding to each p.
[0076] This is shown in the following table 1:
[0077] Table 1
[0078]
[0079]
[0080] If the desired β is 33° and the initial value is 0, then when only i=0, 1, 2, the calculation relationship of the rotation is:
[0081] 1. Beta 0-2 =0:33°>0
[0082] 2. Beta 0-2 =0+1*45°=45°:33°<45°
[0083] 3. Beta 0-2=45°+(-1)*26.565=18.435°:33°>18.435°
[0084] 4. Beta 0-2 =18.435°+(1)*14.036=32.741°
[0085] It can be seen that in the current example, the final rotation angle is 32.741, which is very close to the requirement of 33, and this accuracy can be increased by increasing i.
[0086] That is to say, by using the cordic rotation angle method, any data that can be represented by a triangular quadrant can be calculated.
[0087] Continuing to change the above formula, we can get:
[0088]
[0089] Substituting the angles in the above iterations, we can obtain the following Table 2:
[0090] Table 2
[0091] i=0 45° Tan45°=1 1 i=1 26.565° Tan26.565°=0.49999888 ≈0.5=1*2^(-1) i=2 14.036° Tan14.036°=0.24999549 ≈0.25=1*2^(-2) …i=n … … …
[0092] So the above formula can be continued as:
[0093]
[0094] Therefore, the final cordic operation can be simplified to the above formula, where based on 2 i The relationship can be expressed as the operation relationship for each bit of binary, that is, for each shift of the binary digit, we only need to consider cos(p i a i ) and p i 2 -i According to the above formula, fill in the positive and negative (addition and subtraction) relationship to complete all rotation operations. i 2 -i Compared with binary, it is a shift operation. Therefore, we only need to store cos(p) in advance based on the angle relationship. i a i ) and then perform iterative operations.
[0095] Cordic operations can be divided into rotation mode and vector mode. To simplify the operation and omit the square root operation when calculating the angle, the operation can be expressed as first rotating the y axis to 0, that is, the vector mode:
[0096] X is the vector data of the x-axis;
[0097] Y is the vector data of the y-axis;
[0098] β = 0 is the initial angle;
[0099] After calculation, we can get:
[0100] X' is the updated x-axis vector length;
[0101] Y'=0, indicating that the y-axis data is eliminated;
[0102] β' is the angle obtained only for the x-axis calculation;
[0103] Then go into rotation mode:
[0104] X is the vector data of the x-axis;
[0105] Y=0, vector data of y axis;
[0106] Z = β' is the initial angle;
[0107] After calculation, we can get:
[0108] X'=X*cosβ' is the updated x-axis vector length;
[0109] Y'=Y*sinβ', which is the updated y-axis vector length;
[0110] Z'=0;
[0111] It can be seen that, through the above operation, although the angle is used, the angle is not calculated, so the square root operation can be omitted, simplifying the hardware implementation.
[0112] In order to explain the present invention,
[0113] Considering that the calculations in communication are all complex numbers, a 2X2 input matrix H can be expressed as:
[0114]
[0115] QR decomposition of H, and H includes a real part and an imaginary part in the communication system, taking the following H as an example.
[0116] Q T The real and imaginary parts are expressed as:
[0117] Among them, h 11.re represents the real part of the first row and first column of H, h 11.im represents the imaginary part of the first row and first column of H. Similarly, h 12.rerepresents the real part of the first row and second column element in H, h 12.im Represents the imaginary part of the first row and second column element in H; h 21.re represents the real part of the second row and first column element in H, h 21.im represents the imaginary part of the element in the second row and first column of H; h 22.re represents the real part of the second row and second column element in H, h 22.im Represents the imaginary part of the second row and second column of H.
[0118] The QR decomposition is performed as described above to obtain an upper triangular matrix, and the calculation can be expressed as:
[0119]
[0120] Since the QR decomposition is to obtain an upper triangular matrix, even if the element in the lower left corner of the matrix is 0, that is:
[0121]
[0122] And because of which h 11 and h 21 It can be written as:
[0123]
[0124] So the above calculation can be further written as:
[0125]
[0126] θ2=θ 11 -θ 21
[0127] Based on the above, we can know that the QR decomposition can be converted into the matrix corresponding to θ1 and θ2 through such a matrix transformation relationship, which is the elimination matrix of the desired QR decomposition.
[0128] Because in the communication system, the elements of H are all complex numbers, θ cannot be directly obtained through this formula. However, since each element has a real part and an imaginary part, it can be considered as a trigonometric function based on the corresponding relationship between the real part and the imaginary part:
[0129] h 11.re ,h 11.im =|h 11 |(cosθ 11 +jsinθ 11 )
[0130] h 11.re =|h 11 |cosθ 11
[0131] h11.im =|h 11 |jsinθ 11
[0132] Therefore, each element can be calculated by the above cordic algorithm to find the corresponding angle and perform the corresponding elimination:
[0133]
[0134] The real part of the data can be considered to represent the x-axis, and the imaginary part of the data can be considered to represent the y-axis. Therefore, in hardware implementation, it can be assumed that the imaginary part, that is, the y-axis is 0, so that only the real part value is left, and the cordic calculation only for the real part is performed.
[0135] The present application provides a QR decomposition method applicable to Redcap, which can be applied to any form of electronic equipment, such as terminals and servers. Figure 2 As shown, the QR decomposition method applicable to Redcap includes:
[0136] Step 201: Obtain channel matrix
[0137] Step 202: After the first cordic operation, the element h 11 and h 21 The imaginary part of the element h is eliminated, so that 11 and h 21 Only the real part remains.
[0138] Step 203: After the second cordic operation, the element h 21 The real part of the element h is eliminated, so that 21 is 0, thus obtaining an upper triangular matrix R.
[0139] The first cordic operation includes:
[0140] The element h in the channel matrix 11 The real part h 11.re and the imaginary part h 11.im Calculate according to the vector mode of cordic operation to get the element h 11 The corresponding angle θ 11 , the element h in the channel matrix 21 The real part h 21.re and the imaginary part h 21.im Calculate according to the vector mode of cordic operation to get the element h 21 The corresponding angle θ 21 ; Calculate the elements of the first row of the matrix H according to the rotation mode of the cordic operation, and the rotation angle is θ11 , to eliminate the element h 11 The imaginary part h 11.im , and get the new real part h 11.re ', calculate the elements of the second row of the matrix H according to the rotation mode of the cordic operation, and the rotation angle is θ 21 , to eliminate the element h 21 The imaginary part h 21.im , and get the new real part h 21.re ';
[0141] It should be noted that the angle θ here 11 and angle θ 21 Not an element h 11 and element h 21 The actual corresponding precise angle is not the angle estimated based on the pre-stored table.
[0142] The second cordic operation includes:
[0143] The new real part h 11.re ' and h 21.re 'Calculate according to the vector mode of cordic operation to obtain angle θ0, calculate all elements of the matrix H according to the rotation mode of cordic operation, and rotate by angle θ0 to eliminate element h 21 The real part h 21.re ', that is, element h 21 is 0, thus obtaining an upper triangular matrix R.
[0144] It should be noted that the angle θ0 here does not mean that the new real part h 11.re ' and h 21.re ' is not the exact angle corresponding to the input value, but an estimated angle based on a pre-stored table.
[0145] From the above process, it can be seen that the entire calculation process does not calculate the angle, but directly obtains the estimated value of the angle based on the pre-stored table and displacement calculation, thereby simplifying the calculation.
[0146] For example, when performing the first cordic operation:
[0147] Assume H is:
[0148]
[0149] At this time, the first cordic operation is performed. As mentioned above, the first iteration is to eliminate h 11 and h 21 For example, the imaginary part of H 11.re =0.1,h 11.im=0.4 as the input value, and use the for loop to calculate. As shown in Table 2, the first time i=0, assuming that n is assigned a value of 2, and supports three cycles of 0, 1, and 2. The calculation process is:
[0150] The real and imaginary values after one cycle are calculated based on the following formula:
[0151] Input0=input0–sign0*input1*shift;
[0152] Input1=input1+sign0*input0*shift;
[0153] Among them, Input0 represents the real part value after this calculation, Input1 represents the imaginary part value after this calculation, input0 represents the real part value after the previous calculation, input1 represents the imaginary part value after the previous calculation, sign0 represents the sign number, which is +1 or -1, and shift represents 2^(-i).
[0154] The first time, when i=0:
[0155] Determine whether the real part of the input is less than 0. In this example, 0.1 is greater than 0, so the corresponding sign number is -1.
[0156] Based on the above formula, the real and imaginary values after the first cycle are calculated. From Table 2, we can see that when i=0, shift is 1, which are:
[0157] Input0=input0–sign0*input1*shift=0.1-(-1)*(0.4*1)=0.5;
[0158] Input1=input1+sign0*input0*shift=0.4+(-1)*(0.1*1)=0.3;
[0159] It can be seen that after the first cycle, h 11 The real part of is 0.5 and the imaginary part is 0.3.
[0160] The second time, when i=1:
[0161] The real value 0.5 is greater than zero, so the corresponding sign number is -1. The shift is 2^(-1), which is 0.5. Correspondingly:
[0162] Input0=input0–sign0*input1*shift=0.5-(-1)*(0.3*0.5)=0.65
[0163] Input1=input1+sign0*input0*shift=0.3+(-1)*(0.5*0.5)=0.05
[0164] Third time:
[0165] The real value 0.65 is greater than zero, so the corresponding sign number is -1. The shift is 2^(-2), which is 0.25. Correspondingly:
[0166] Input0=input0–sign0*input1*shift=0.65-(-1)*(0.05*0.25)=0.6625;
[0167] Input1=input1+sign0*input0*shift=0.05+(-1)*(0.65*0.25)=-0. 112 5;
[0168] Based on the above calculation process, we can know that according to the accuracy limit of three iterations, the second iteration eliminates the need for input1, that is, the imaginary part of the current data, and is closest to 0. However, because it is a cordic rotation method implemented based on hardware, it is impossible to determine which iteration has the highest accuracy unless the value obtained is directly 0. In order to improve the accuracy, we can only increase the number of iterations n, that is, the bit width of the hardware.
[0169] It should be noted that the calculation itself is to eliminate the imaginary part. Although the precision limit cannot reach the true imaginary part value of 0, the purpose of the calculation itself is to get 0, and the subsequent calculation requires the imaginary part to be 0 at this time. Therefore, h can be used in subsequent calculations. 11.im Assign a value of 0.
[0170] At this point, a calculation based on the vector mode is completed.
[0171] The calculation of the above vector mode, because in the process of rotation, each step will determine the current positive or negative rotation of the angle based on the positive and negative values, so the same rotation at each step actually determines the angle value β.
[0172] Then, based on the order of rotation at this time, that is, the positive and negative relationship, the corresponding angle value β is mapped to h 12 , which is called rotation mode calculation.
[0173] Continuing with the above example, the corresponding vector modes are operated as -1, -1, -1 three times, which means that the angles mapped to β are 0, -45°, -26.565°, and -14.036° respectively.
[0174] The rotation mode operation performed is:
[0175] X'=X*cosβ' is the updated x-axis vector length;
[0176] Y'=Y*sinβ', which is the updated y-axis vector length;
[0177] At this time, the rotation direction h 12 and h 22 , continue with h 12 For example, the real part is the x-axis data and the imaginary part is the y-axis data.
[0178] Assumption: h 12.re =0.4,h 12.im =0.6
[0179]
[0180] Because: sin(a±b)=sinacosb±cosasinb
[0181] Since the above angles are already determined, the calculated values of cosine and sin at different angles can be obtained in advance (as shown in the following table, which can be stored in advance)
[0182] i=0 45° cos45°=0.707 sin45°=0.707 i=1 26.565° cos26.565°=0.891 01 sin26.565°=0.453 99 i=2 14.036° cos14.036°=0.970 3 sin14.036°=0.241 92 … … … …
[0183] So the calculation based on β values of 0, -45°, -26.565°, and -14.036° is:
[0184] h 12.re =0.4,h 12.im =0.6
[0185] 1st:cos(-45-26.565)=cos(-45)sin(-26.565)-sin(-45)*cos(-26.565)=0.30902
[0186] sin(-45-26.565)=sin(-45)*cos(-26.565)+cos(-45)sin(-26.565)=-0.95106
[0187] 2nd:cos(-45-26.565-14.036)=cos(-45-26.565)sin(-14.036)-sin(-45-26.565)*cos(-14.036)=0.069756
[0188] sin(-45-26.565-14.036)=sin(-45-26.565)*cos(-14.036)+cos(-45-26.565)sin(-14.036)=-0.95106
[0189] h 12.re *cosβ=0.4*cos(-45-26.565-14.036)=0.4*0.069756=0.0279024
[0190] h 12.im *sinβ=0.6*sin(-45-26.565-14.036)=0.6*(-0.95106)=-0.598536
[0191] At this point, a calculation based on the selection mode is completed.
[0192] The above is the first cordic operation, for h 11 and h 21 Eliminate the imaginary part and update the remaining elements h 21 and h 22 .
[0193] It can be understood that since there is no mutual influence between the calculated rows of the matrix, for h 21 The calculation can be parallel to h 11 calculation to improve the operational efficiency.
[0194] Furthermore, the second cordic operation is to convert the h after the first cordic operation 11 The real part and h 21 The real part of h is used as the input value, first the vector mode is performed, and then the corresponding angles are used to update h 11 and h 21 The real part of the second cordic operation is calculated in the same way as the rotation mode described above. The logic of the second cordic operation is the same as the algorithm principle of the first cordic operation, which can be obtained by replacing the input data. That is, in the first cordic operation, the input data is h 11 The real and imaginary parts of h 21 The real and imaginary parts of the second cordic operation are the input data of the first cordic operation. 11 The real part and h 21 The specific iterative process will not be described here.
[0195] In an optional embodiment, the QR decomposition method applicable to Redcap of the present application further includes: after a third cordic operation, the element h 22The imaginary part of the element h is eliminated, so that 22 Only the real part remains, thus obtaining an upper triangular matrix R' which is convenient for subsequent calculations.
[0196] In an optional embodiment, the QR decomposition method applicable to Redcap of the present application, the third cordic operation includes:
[0197] The elements h in the upper triangular matrix 22 The real part h 22.re and the imaginary part h 22.im Calculate according to the vector mode of cordic operation to get the element h 22 The corresponding angle θ 22 ; Calculate the elements of the second row of the upper triangular matrix according to the rotation mode of the cordic operation, and the rotation angle is θ 22 , to eliminate the element h 22 The imaginary part h 22.im , and get the new real part h 22.re '.
[0198] The third cordic operation is to convert the element h 22 The real part h 22.re and the imaginary part h 22.im As the input word, the corresponding angle is obtained through the vector mode, and then the imaginary data is eliminated through the rotation mode. The third cordic operation eliminates the element h 22 The operation logic of the imaginary part is consistent with the first cordic operation and will not be repeated here.
[0199] It should be noted that the above process description is performed for the operation of H. When H performs a certain operation, in order to ensure the correspondence of data between the receiving matrix y and H, y also needs to perform corresponding operations.
[0200] Considering that the operations implemented by the hardware are all fixed-point and the data types are all binary data of 0 and 1, there are certain limitations on the representation of the data. The above angle calculation requires arctan, and the obtained value must be a floating-point number. Even if the accuracy is very high, new errors will be introduced during the floating-point to fixed-point conversion, thereby reducing the accuracy.
[0201] Therefore, considering the characteristics of the hardware, the design angle calculation is directly started from the hardware method.
[0202] Assuming that the operation is concentrated in the first and fourth quadrants, considering that arctan operation is based on binary, it can be expressed as:
[0203] arctan(x)=arctan(s02 0 +s12-1 +...s n 2 -n )
[0204] Where s represents +1 or -1, indicating an increase or decrease in angle, and n is the precision of the QR decomposition.
[0205] Consider splitting operations including:
[0206] arctan(1*2 0 )*180° / π
[0207] =arctan(1)*180° / π
[0208] =45°
[0209] By analogy, the above Table 1 can be obtained. Through such conversion, any angle within the range can be mapped to the specific operation of each bit through the setting of n. And as n increases, the accuracy of the angle will also increase.
[0210] When operations involving the second and third quadrants are required, the above table is expanded by increasing i=-1, -2, etc. in reverse direction. The corresponding relationship can be expressed as shown in Table 3 below:
[0211] Table 3
[0212] The value of i angle -1 63.434° -2 75.963° -3 82.875° …n …
[0213] This part of the operation where i is a negative number can be reflected in the circuit as judging the positive and negative value of the y-axis, that is, the imaginary part of the data on the y-axis. When it is positive, it is positive, otherwise it is negative.
[0214] In the present invention, the number of iterations n of each cordic operation is determined based on the bit width of the QR decomposition circuit. Based on the circuit bit width of the upstream and downstream modules of the circuit and the actual performance requirements, a precision of QR decomposition execution is set, and this precision is converted into the bit width of the QR decomposition, and n is obtained for its bit width. Therefore, according to the actual operation, the sign bit is judged at each bit of the bit width, so as to obtain a forward or reverse rotation operation. Finally, the final operation result is obtained through multiple rotations and iterations.
[0215] For the complex algorithm of QR decomposition, the hardware mapping is finally converted into the vector mode and rotation mode of cordic operation. Since each vector mode or rotation mode is to calculate arctan, cordic operation is performed on each bit based on the sign bit.
[0216] The hardware of the QR decomposition method suitable for Redcap based on the present application needs to set up a basic operation unit of a pseudocode, and then complete the first, second, and third iterations by changing the input, thereby completing all the operations of the QR decomposition.
[0217] This application converts QRD into three steps by dividing the operation, converting it into rotation and vector modes, and then applying all numerical relationships and operations in the matrix based on the above two modes. Each step is a call to the basic hardware module, so that the hardware can be reused, pipelined and parallelized, reducing area loss.
[0218] By mapping the angle to the hardware under the fixed-point model, it is possible to perform operations at different angles through iteration, and the accuracy of the angle can determine the bit width of the hardware to implement the fixed-point model. The supported quadrants are expanded and the hardware implementation method is simplified. Compared with expanding bits, the simple judgment implementation method has a smaller area loss.
[0219] Redcap is derived from 5G. It is a more practical and efficient solution based on the implementation of 5G according to the scenario. QR decomposition is a hardware module that occupies a large area and consumes a large amount of power in the hardware, while the Redcap protocol defines that there is no need to support matrix decompositions above 2. Therefore, in view of the characteristics of Redcap and the UE's optimization requirements for area and power consumption, the present invention proposes a QR decomposition solution for Redcap. The solution uses cordic Givens as the algorithm basis. By improving the algorithm and implementation method based on the characteristics of the hardware, it can eventually perform cordic operations by scheduling simple hardware modules, and complete all QR decomposition functions by changing the input. The hardware area of the solution can reach 12.5% of the original traditional 5G UE solution. It has obvious advantages in complexity, area, power consumption, etc. After simulating the throughput and block error rate (BLER), the performance results obtained can be seen respectively. Figure 3 and Figure 4 .
[0220] By comparing the throughput and BLER, it can be seen that although the area is optimized by 87.5%, the throughput and BLER of the present invention are not reduced, and the advantage is obvious.
[0221] Based on the same concept, a QR decomposition device suitable for Redcap is provided in the embodiment of the present application. The specific implementation of the device can be found in the description of the method embodiment part, and the repeated parts will not be repeated. The device mainly includes:
[0222] Acquisition module, used to obtain the channel matrix
[0223] The first cordic operation module is used to convert the element h 11 and h 21 The imaginary part of the element h is eliminated, so that 11 and h 21 Only the real part remains;
[0224] The second cordic operation module is used to convert the element h into 21 The real part of the element h is eliminated, so that 21 is 0, thus obtaining an upper triangular matrix R.
[0225] Optionally, also include:
[0226] The third cordic operation module is used to convert the element h into 22 The imaginary part of the element h is eliminated, so that 22 Only the real part remains, thus obtaining an upper triangular matrix R' which is convenient for subsequent calculations.
[0227] Optionally, the first cordic operation module is specifically used for:
[0228] The element h in the channel matrix 11 The real part h 11.re and the imaginary part h 11.im Calculate according to the vector mode of cordic operation to get the element h 11 The corresponding angle θ 11 , the element h in the channel matrix 21 The real part h 21.re and the imaginary part h 21.im Calculate according to the vector mode of cordic operation to get the element h 21 The corresponding angle θ 21 ; Calculate the elements of the first row of the matrix H according to the rotation mode of the cordic operation, and the rotation angle is θ 11 , to eliminate the element h 11 The imaginary part h 11.im , and get the new real part h 11.re ', calculate the elements of the second row of the matrix H according to the rotation mode of the cordic operation, and the rotation angle is θ 21 , to eliminate the element h 21 The imaginary part h 21.im , and get the new real part h 21.re ';
[0229] The second cordic operation module is specifically used for:
[0230] The new real part h11.re ' and h 21.re 'Calculate according to the vector mode of cordic operation to obtain angle θ0, calculate all elements of the matrix H according to the rotation mode of cordic operation, and rotate by angle θ0 to eliminate element h 21 The real part h 21.re ', that is, element h 21 is 0, thus obtaining an upper triangular matrix R.
[0231] Based on the same concept, an electronic device is also provided in the embodiment of the present application, such as Figure 5 As shown, the electronic device mainly includes: a processor 501, a memory 502 and a communication bus 503, wherein the processor 501 and the memory 502 communicate with each other through the communication bus 503. The memory 502 stores a program executable by the processor 501, and the processor 501 executes the program stored in the memory 502 to implement the following steps:
[0232] Get channel matrix After the first cordic operation, the element h 11 and h 21 The imaginary part of the element h is eliminated, so that 11 and h 21 Only the real part remains; after the second cordic operation, the element h 21 The real part of the element h is eliminated, so that 21 is 0, thus obtaining an upper triangular matrix R.
[0233] The communication bus 503 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 503 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0234] The memory 502 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the processor 501 .
[0235] The above-mentioned processor 501 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0236] The electronic device provided in the embodiment of the present application may specifically be a module capable of realizing a communication function or a terminal device including the module, etc. The terminal device may be a mobile terminal or a smart terminal. The mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a laptop computer, etc.; the smart terminal may specifically be a terminal including a wireless communication module such as a smart car, a smart watch, a shared bicycle, a smart cabinet, etc.; the module may specifically be a wireless communication module, such as any one of a 2G communication module, a 3G communication module, a 4G communication module, a 5G communication module, and a NB-IOT communication module.
[0237] In another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is run on a computer, the computer executes the QR decomposition method applicable to Redcap described in the above embodiment.
[0238] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. 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 instruction is 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 device. The computer instruction 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 instruction is transmitted from a website site, a computer, a server or a data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, 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, a data center, etc. that contains one or more available media integration. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk), etc.
[0239] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0240] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A QR decomposition method suitable for Redcap, characterized in that: include: Get channel matrix After the first cordic operation, the element h 11 and h 21 The imaginary part of the element h is eliminated, so that 11 and h 21 Only the real part remains; after the second cordic operation, the element h 21 The real part of the element h is eliminated, so that 21 is 0, thus obtaining an upper triangular matrix R.
2. The QR decomposition method applicable to Redcap according to claim 1, characterized in that: Also includes: After the third cordic operation, the element h 22 The imaginary part of the element h is eliminated, so that 22 Only the real part remains, thus obtaining an upper triangular matrix R' which is convenient for subsequent calculations.
3. The QR decomposition method applicable to Redcap according to claim 1, characterized in that: The first cordic operation includes: The element h in the channel matrix 11 The real part h 11.re and the imaginary part h 11.im Calculate according to the vector mode of cordic operation to get the element h 11 The corresponding angle θ 11 , the element h in the channel matrix 21 The real part h 21.re and the imaginary part h 21.im Calculate according to the vector mode of cordic operation to get the element h 21 The corresponding angle θ 21 ; Calculate the elements of the first row of the matrix H according to the rotation mode of the cordic operation, and the rotation angle is θ 11 , to eliminate the element h 11 The imaginary part h 11.im , and get the new real part h 11.re ', calculate the elements of the second row of the matrix H according to the rotation mode of the cordic operation, and the rotation angle is θ 21 , to eliminate the element h 21 The imaginary part h 21.im , and get the new real part h 21.re '; The second cordic operation includes: The new real part h 11.re ' and h 21.re 'Calculate according to the vector mode of cordic operation to obtain angle θ0, calculate all elements of the matrix H according to the rotation mode of cordic operation, and rotate by angle θ0 to eliminate element h 21 The real part h 21.re ', that is, element h 21 is 0, thus obtaining an upper triangular matrix R.
4. The QR decomposition method applicable to Redcap according to claim 2, characterized in that: The third cordic operation includes: The elements h in the upper triangular matrix 22 The real part h 22.re and the imaginary part h 22.im Calculate according to the vector mode of cordic operation to get the element h 22 The corresponding angle θ 22 ; Calculate the elements of the second row of the upper triangular matrix according to the rotation mode of the cordic operation, and the rotation angle is θ 22 , to eliminate the element h 22 The imaginary part h 22.im , and get the new real part h 22.re '.
5. The QR decomposition method applicable to Redcap according to claim 1, characterized in that: The maximum number of iterations of the cordic operation is determined based on the bit width of the QR decomposition circuit.
6. A QR decomposition device suitable for Redcap, characterized in that: include: Acquisition module, used to obtain the channel matrix The first cordic operation module is used to convert the element h 11 and h 21 The imaginary part of the element h is eliminated, so that 11 and h 21 Only the real part remains; The second cordic operation module is used to convert the element h into 21 The real part of the element h is eliminated, so that 21 is 0, thus obtaining an upper triangular matrix R.
7. The QR decomposition device suitable for Redcap according to claim 6, characterized in that: Also includes: The third cordic operation module is used to convert the element h into 22 The imaginary part of the element h is eliminated, so that 22 Only the real part remains, thus obtaining an upper triangular matrix R' which is convenient for subsequent calculations.
8. The QR decomposition device suitable for Redcap according to claim 6, characterized in that: The first cordic operation module is specifically used for: The element h in the channel matrix 11 The real part h 11.re and the imaginary part h 11.im Calculate according to the vector mode of cordic operation to get the element h 11 The corresponding angle θ 11 , the element h in the channel matrix 21 The real part h 21.re and the imaginary part h 21.im Calculate according to the vector mode of cordic operation to get the element h 21 The corresponding angle θ 21 ; Calculate the elements of the first row of the matrix H according to the rotation mode of the cordic operation, and the rotation angle is θ 11 , to eliminate the element h 11 The imaginary part h 11.im , and get the new real part h 11.re ', calculate the elements of the second row of the matrix H according to the rotation mode of the cordic operation, and the rotation angle is θ 21 , to eliminate the element h 21 The imaginary part h 21.im , and get the new real part h 21.re '; The second cordic operation module is specifically used for: The new real part h 11.re ' and h 21.re 'Calculate according to the vector mode of cordic operation to obtain angle θ0, calculate all elements of the matrix H according to the rotation mode of cordic operation, and rotate by angle θ0 to eliminate element h 21 The real part h 21.re ', that is, element h 21 is 0, thus obtaining an upper triangular matrix R.
9. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to execute the program stored in the memory to implement the QR decomposition method applicable to Redcap as described in any one of claims 1-5.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the QR decomposition method applicable to Redcap described in any one of claims 1 to 5 is implemented.