PHASE ENCODING METHOD AND APPARATUS, AND COMMUNICATION DEVICE
20250392355 ยท 2025-12-25
Assignee
Inventors
- Biying Wang (Shenzhen, CN)
- Xiaopeng Cui (Shanghai, CN)
- Hongjing Xu (Shanghai, CN)
- Guanxi Zhang (Shanghai, CN)
- Man Hong Yung (Shenzhen, CN)
Cpc classification
H04B7/0456
ELECTRICITY
International classification
Abstract
A phase encoding method includes: determining, based on a plurality of to-be-encoded phases, a quantity of a plurality of bits needed for encoding the plurality of phases; generating first-order terms and higher-order terms of the plurality of bits; constructing a bit matrix based on the plurality of phases, the first-order terms, and the higher-order terms, where the bit matrix includes a plurality of value combinations of the plurality of bits; calculating a plurality of encoding coefficients based on the bit matrix and the plurality of phases; and encoding the plurality of phases by using the plurality of encoding coefficients. This method may be performed by any encoding process in which an encoding object is a discrete value.
Claims
1. A method performed by a processor of a communication device for phase encoding one or more communications, comprising: determining, based on a plurality of to-be-encoded phases for the one or more communications, a quantity of a plurality of bits needed for encoding the plurality of phases; generating first-order terms and higher-order terms of the plurality of bits; constructing a bit matrix based on the plurality of phases, the first-order terms, and the higher-order terms, wherein the bit matrix comprises a plurality of value combinations of the plurality of bits; calculating a plurality of encoding coefficients based on the bit matrix and the plurality of phases; encoding the plurality of phases by using the plurality of encoding coefficients; and transmitting the one or more communications with the phase encoding.
2. The method according to claim 1, wherein determining, based on the plurality of to-be-encoded phases, the quantity of the plurality of bits needed for encoding the plurality of phases comprises: when a quantity of the plurality of phases is 2.sup.N, determining that the quantity of bits needed for encoding the 2.sup.N phases is N.
3. The method according to claim 1, wherein generating the first-order terms and the higher-order terms of the plurality of bits comprises: generating a first-order term of each bit, wherein the first-order term is the bit; and multiplying the bits one by one to obtain the higher-order terms comprising a second-order product term to an N-order product term, wherein Nis the quantity of the plurality of bits, a higher-order term of any order comprises product terms of the plurality of bits, and bits in a same product term are different from each other.
4. The method according to claim 3, wherein multiplying the bits one by one to obtain the higher-order terms comprising the second-order product term to the N-order product term comprises: determining an order of a to-be-generated higher-order term; determining a quantity of higher-order terms with the order; and multiplying the bits one by one based on the quantity of terms to obtain the higher-order terms with the order.
5. The method according to claim 4, wherein determining the quantity of higher-order terms with the order comprises: when the quantity of the plurality of bits is N and the order is X, determining that the quantity of higher-order terms with the order is
6. The method according to claim 1, wherein constructing the bit matrix based on the plurality of phases, the first-order terms, and the higher-order terms comprises: constructing a system of linear equations based on the plurality of phases, the first-order terms, and the higher-order terms; and determining the bit matrix based on the system of linear equations, wherein a quantity of equations comprised in the system of linear equations is equal to the quantity of the plurality of phases, expressions of the phases on one side of equal signs of the plurality of equations are different from each other, expressions of the first-order terms and the higher-order terms on the other side of the equal signs of the plurality of equations are the same, the first-order term and the higher-order term in each equation have coefficients respectively, and the coefficients form the encoding coefficients.
7. The method according to claim 6, wherein constructing the system of linear equations based on the plurality of phases, the first-order terms, and the higher-order terms comprises: if rotation angles of the plurality of phases are equally spaced, extracting the higher-order terms of odd-numbered orders; and constructing the system of linear equations based on the plurality of phases, the first-order terms, and the higher-order terms of the odd-numbered orders.
8. The method according to claim 6, wherein determining the bit matrix based on the system of linear equations comprises: determining a value of any bit; and generating values of other bits based on the value of the any bit, to obtain the plurality of value combinations of the plurality of bits, wherein the plurality of value combinations form the bit matrix.
9. The method according to claim 8, wherein the values of the any bit and the other bits are 1 or 1.
10. The method according to claim 1, wherein calculating the plurality of encoding coefficients based on the bit matrix and the plurality of phases comprises: determining a phase vector comprising the plurality of phases; calculating a product of a transpose of the phase vector and an inverse matrix of the bit matrix, to obtain a transpose of a coefficient vector comprising the plurality of encoding coefficients; and determining the plurality of encoding coefficients based on the transpose of the coefficient vector.
11. A communication device, comprising: a memory configured to store instructions; and a processor coupled to the memory and configured to execute the instructions to cause the computing device to: determine, based on a plurality of to-be-encoded phases for a communication, a quantity of a plurality of bits needed for encoding the plurality of phases; generate first-order terms and higher-order terms of the plurality of bits; construct a bit matrix based on the plurality of phases, the first-order terms, and the higher-order terms, wherein the bit matrix comprises a plurality of value combinations of the plurality of bits; calculate a plurality of encoding coefficients based on the bit matrix and the plurality of phases; encode the plurality of phases by using the plurality of encoding coefficients; and transmit the phase encoded communication.
12. The communication device according to claim 11, wherein determining, based on the plurality of to-be-encoded phases, the quantity of the plurality of bits needed for encoding the plurality of phases comprises: when a quantity of the plurality of phases is 2.sup.N, determining that the quantity of bits needed for encoding the 2.sup.N phases is N.
13. The communication device according to claim 11, wherein generating the first-order terms and the higher-order terms of the plurality of bits comprises: generating a first-order term of each bit, wherein the first-order term is the bit; and multiplying the bits one by one to obtain the higher-order terms comprising a second-order product term to an N-order product term, wherein Nis the quantity of the plurality of bits, a higher-order term of any order comprises product terms of the plurality of bits, and bits in a same product term are different from each other.
14. The communication device according to claim 13, wherein multiplying the bits one by one to obtain the higher-order terms comprising the second-order product term to the N-order product term comprises: determining an order of a to-be-generated higher-order term; determining a quantity of higher-order terms with the order; and multiplying the bits one by one based on the quantity of terms to obtain the higher-order terms with the order.
15. The communication device according to claim 14, wherein determining the quantity of higher-order terms with the order comprises: when the quantity of the plurality of bits is N and the order is X, determining that the quantity of higher-order terms with the order is
16. The communication device according to claim 11, wherein constructing the bit matrix based on the plurality of phases, the first-order terms, and the higher-order terms comprises: constructing a system of linear equations based on the plurality of phases, the first-order terms, and the higher-order terms; and determining the bit matrix based on the system of linear equations, wherein a quantity of equations comprised in the system of linear equations is equal to the quantity of the plurality of phases, expressions of the phases on one side of equal signs of the plurality of equations are different from each other, expressions of the first-order terms and the higher-order terms on the other side of the equal signs of the plurality of equations are the same, the first-order term and the higher-order term in each equation have coefficients respectively, and the coefficients form the encoding coefficients.
17. The communication device according to claim 16, wherein constructing the system of linear equations based on the plurality of phases, the first-order terms, and the higher-order terms comprises: if rotation angles of the plurality of phases are equally spaced, extracting the higher-order terms of odd-numbered orders; and constructing the system of linear equations based on the plurality of phases, the first-order terms, and the higher-order terms of the odd-numbered orders.
18. The communication device according to claim 16, wherein determining the bit matrix based on the system of linear equations comprises: determining a value of any bit; and generating values of other bits based on the value of the any bit, to obtain the plurality of value combinations of the plurality of bits, wherein the plurality of value combinations form the bit matrix.
19. The communication device according to claim 18, wherein the values of the any bit and the other bits are 1 or 1.
20. The communication device according to claim 11, wherein the communication device comprises any one of a base station, a reconfigurable intelligent surface, or a router.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
DESCRIPTION OF EMBODIMENTS
[0070] To clearly describe technical solutions in embodiments of the present disclosure, terms such as first and second are used in embodiments of the present disclosure to distinguish between same items or similar items that provide basically same functions and purposes. For example, a first phase and a second phase are merely used to distinguish between different phases, and do not limit a quantity and an execution sequence of the first phase and the second phase.
[0071] It should be noted that, in embodiments of the present disclosure, terms such as example or for example are used to represent giving an example, an illustration, or a description. Any embodiment or design solution described by using example or for example in embodiments of the present disclosure should not be explained as being more preferred or having more advantages than another embodiment or design solution. Exactly, use of the terms such as example or for example is intended to present a related concept in a specific manner.
[0072] A service scenario described in embodiments of the present disclosure is intended to describe the technical solutions in embodiments of the present disclosure more clearly, but does not constitute a limitation on the technical solutions provided in embodiments of the present disclosure. A person of ordinary skill in the art may learn that as a new service scenario emerges, the technical solutions provided in embodiments of the present disclosure are also applicable to a similar technical problem.
[0073] In embodiments of the present disclosure, at least one means one or more, and a plurality of means two or more. The term and/or describes an association relationship between associated objects, and represents that three relationships may exist. For example, A and/or B may represent the following cases: Only A exists, both A and B exist, and only B exists, where A and B may be singular or plural. The character / generally indicates an or relationship between the associated objects. At least one of the following items (pieces) or a similar expression thereof indicates any combination of these items, including a single item (piece) or any combination of a plurality of items (pieces). For example, at least one item (piece) of a, b, or c may indicate: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c may be singular or plural.
[0074] Steps in a phase encoding method provided in embodiments of the present disclosure are merely examples. Not all steps are mandatory steps, or not all content in each step is mandatory. In a use process, addition or deletion may be performed as required.
[0075] A same step or steps or messages having a same function in embodiments of the present disclosure may be mutually referenced in different embodiments.
[0076] As an antenna scale grows from hundreds to thousands, phase optimization only in weight optimization can reduce communication costs better than amplitude and phase optimization, and has gradually become the focus of current research.
[0077] In algorithms for resolving a problem of weight optimization, a holographic algorithm is an algorithm having a high speed. This algorithm is an analytic algorithm, and resolves a problem of continuous optimization. However, in a real communication scenario, a limitation of a phase shifter in an antenna device makes antenna phases present a discrete characteristic. Using the holographic algorithm to transform results of continuous optimization to discrete values may introduce an extra error. As a result, an optimization effect is severely affected. Another algorithm to resolve the weight optimization problem is a genetic algorithm, which can resolve a unidirectional beam enhancement problem by perform selection, crossing, and mutation iteration on a population including all weight combinations. However, it often takes several days to optimize an array of thousands of antennas by using the genetic algorithm. As an antenna array scale grows, an optimization speed of the genetic algorithm cannot meet actual communication requirements. In addition, both the holographic algorithm and the genetic algorithm can only perform unidirectional beam enhancement, and cannot support multidirectional enhancement suppression in spatial domain.
[0078] Currently, some have begun to use quantum computing to resolve such optimization problems. Correspondingly, a classical algorithm inspired by quantum computing, that is, a quantum heuristic algorithm, is also now being studied, and becomes a potential algorithm that can quickly resolve any beamforming. However, whether quantum computing or the quantum heuristic algorithm is to be used, the phases need to be encoded first, and an encoding mode directly affects solution quality of the optimization algorithm.
[0079] Quadrature amplitude modulation (QAM) is a universal base station weight encoding method, and an encoding process thereof includes encoding for an antenna amplitude and a phase.
[0080] s.sub.1 and s.sub.2 represent the two bits for encoding the real part, and s.sub.3 and s.sub.4 represent the two bits for encoding the imaginary part.
[0081] Because in amplitude and phase encoding, the real part and the imaginary part are encoded separately, if the encoding mode is applied to only phase encoding, when a quantity of phases exceeds 4, a large quantity of redundant codes are generated. As a result, a quantity of bits needs to be increased additionally during weight optimization. In addition, the redundant codes generated during encoding based on the encoding mode may cause a large quantity of constraint items in an optimization process. This severely affects a speed and quality of optimization.
[0082] For the foregoing problem, an embodiment of the present disclosure provides a phase encoding method. The method is an encoding method in which N bits are mapped to 2.sup.N phases, which means that an encoding scheme without redundancy or constraint is constructed with a minimum quantity of bits, to facilitate quick optimization of a subsequent algorithm and improve a capability of resolving a beamforming problem by using the algorithm.
[0083]
[0084] The following describes the phase encoding method in the present disclosure with reference to specific embodiments.
[0085]
[0086] S301: Generate all first-order terms and higher-order terms based on a quantity of bits needed for encoding.
[0087] The method may be performed by a communication device. The communication device may include a base station, an RIS, a router, and the like. In other words, the communication device may encode a phase by using the method. Before encoding, the quantity of bits needed for encoding may be first determined. The quantity of bits may be determined based on a quantity of to-be-encoded phases.
[0088] In an example, if the quantity of to-be-encoded phases is 2.sup.N, the quantity of bits needed for encoding the phases is N. In other words, in the phase encoding method provided in this embodiment of the present disclosure, N bits may be used to encode 2.sup.N to-be-encoded target phases. The 2.sup.N to-be-encoded target phases may be marked with a vector P=[.sub.1, . . . , .sub.2.sub.
[0089] After the quantity of bits needed for encoding is determined, all first-order terms and higher-order terms of the N bits may be first generated.
[0090] The first-order terms of the N bits may be the N bits.
[0091] For example, if the N bits are respectively s.sub.1, s.sub.2, . . . , and s.sub.N, all the first-order terms are s.sub.1, s.sub.2, . . . , and s.sub.N.
[0092] The higher-order terms of the N bits may include all higher-order terms including a second-order product term to an N-order product term. A higher-order term of any order may include product terms of a plurality of bits, and bits in a same product term need to be different from each other.
[0093] For example, if the N bits are respectively s.sub.1, s.sub.2, . . . , and s.sub.N, second-order terms of the N bits may include s.sub.is.sub.j(ij). For example, s.sub.1s.sub.2, s.sub.1s.sub.3, s.sub.1s.sub.4, . . . , s.sub.1s.sub.N, s.sub.2s.sub.3, s.sub.2s.sub.4, . . . , s.sub.2s.sub.N, . . . , and s.sub.N-1s.sub.N are included. A total quantity of second-order terms is
[0094] Third-order terms may include s.sub.is.sub.js.sub.k(ijk). For example, s.sub.1s.sub.2s.sub.3, s.sub.1s.sub.2s.sub.4, s.sub.1s.sub.2s.sub.5, . . . , s.sub.1s.sub.2s.sub.N, s.sub.2s.sub.354, s.sub.2s.sub.3s.sub.5, . . . , s.sub.2s.sub.3s.sub.N, . . . , and s.sub.N-2s.sub.N-1s.sub.N are included. A total quantity of third-order terms is
[0095] Similarly, an N-order term may include s.sub.1s.sub.2 . . . s.sub.N, and a quantity of N-order terms is 1, that is,
[0096] Therefore, when a quantity of the plurality of bits is N and an order is X, a quantity of higher-order terms with the order is
[0097] A total quantity of all the first-order terms and higher-order terms of the N bits is 2.sup.N.
[0098] S302: Construct a bit matrix based on all the first-order terms and higher-order terms.
[0099] After all the first-order terms and higher-order terms of the N bits are generated, the bit matrix may be constructed. The bit matrix may include a plurality of value combinations of the plurality of bits.
[0100] In a possible implementation, all the first-order terms and higher-order terms may be combined, and 2.sup.N coefficients c are used to construct a system of linear equations, and the bit matrix is determined based on the system of linear equations.
[0101] The constructed system of linear equations in this embodiment of the present disclosure may include a plurality of equations, and a quantity of the plurality of equations is equal to the quantity of to-be-encoded phases. For example, if the quantity of to-be-encoded phases is 2.sup.N, the constructed system of linear equations includes 2.sup.N equations.
[0102] For example, the system of linear equations including 2.sup.N equations may be represented as follows:
[0103] It can be seen from Formula (2) that expressions of to-be-encoded phases on one side of equal signs of the plurality of equations are different from each other, in other words, an expression of one phase is on the right side of the equal signs of the equations of the system of linear equations, that is, .sub.1 to .sub.2.sub.
These first-order terms and higher-order terms further have coefficients respectively, that is, c.sub.1, . . . , and C.sub.2.sub.
[0104] In this embodiment of the present disclosure, the bit matrix S.sub.N may be constructed by using a total of combinations of the N bits, and a value of the matrix may include the plurality of value combinations of the plurality of bits. The value combinations of the N bits form a row [s.sub.1, s.sub.2, . . . , s.sub.1s.sub.2 . . . s.sub.N] of the bit matrix. Correspondingly, each column of the bit matrix corresponds to values of higher-order terms or first-order terms of the N bits.
[0105] Because each column of the bit matrix is linearly independent, the finally obtained bit matrix is a full-rank square matrix.
[0106] s.sub.303: Perform a matrix operation on the bit matrix to obtain the encoding coefficient.
[0107] Formula (2) in the previous step may be expressed in a matrix calculation form, that is, the following Formula (3):
[0108] S.sub.N is the bit matrix, a vector C=[c.sub.1, . . . , c.sub.2.sub.
[0109] Formula (3) is processed to obtain an expression of the encoding coefficient as follows:
[0110] S.sub.N.sup.1 is an inverse matrix of the bit matrix s.sub.N.
[0111] S304: Perform phase encoding by using the encoding coefficient.
[0112] The to-be-encoded phases may be encoded by using the calculated encoding coefficient. Specifically, the calculated encoding coefficient may be substituted into the system of linear equations (2), to complete encoding of the phases.
[0113] In this embodiment of the present disclosure, the higher-order term is introduced to construct encoding, so that a coefficient matrix of a system of linear equations that needs to be solved is a full-rank square matrix, and one-to-one encoding on N bits to 2.sup.N phases is implemented. In the method, a large quantity of redundant codes are not generated in an encoding process. This is beneficial to optimization of a subsequent optimization algorithm. In addition, in the phase encoding method provided in this embodiment of the present disclosure, a quantity of bits needed for encoding can be reduced as much as possible. In comparison with conventional technologies in which only phase encoding is performed through QAM, the quantity of bits can be halved.
[0114] For ease of understanding, the following describes the phase encoding method provided in this embodiment of the present disclosure with reference to a specific example.
[0115]
[0116] If rotation angles of a plurality of to-be-encoded phases are equally spaced, a half of the phases may be obtained by rotating the other half of the phases by 180, that is, the other half of the phases may be obtained by multiplying the half of the phases by 1. For example, the phase A.sub.4 may be obtained by rotating the phase A, in
[0117] The following describes the phase encoding method in this embodiment of the present disclosure by using an example in which eight phases in
[0118] Because a quantity of to-be-encoded phases is 8, that is, 23 phases, a quantity of bits needed for encoding is 3. In other words, a process of encoding eight phases using three bits is described in this example. With reference to
[0119] According to the encoding process described in the foregoing embodiment, all first-order terms and higher-order terms of three bits need to be first generated. In this example, only higher-order terms of odd-numbered orders need to be extracted, and only all first-order terms and third-order terms need to be used during actual encoding. The third-order terms may be represented as s.sub.1S.sub.3S.sub.3.
[0120] Then, the bit matrix s.sub.N is constructed. According to the encoding process described in the foregoing embodiment, a constructed linear equation may be expressed as:
[0121] There are eight combinations of bit values in total. Because a half of the phases in
[0122] For example, assuming s.sub.1=1, a corresponding bit matrix may be obtained as follows:
[0123] It is clear that, s.sub.1 may alternatively be another value, for example, s.sub.1=1, and the obtained bit matrix may be represented as:
[0124] For the angle , angle values obtained when i=0, 1, 2, 3 are extracted, that is, the following angle values are extracted:
[0125] In this way, the phase vector P may be generated as follows:
[0126] According to Formula (4), the coefficient vector used for encoding may be calculated as follows:
[0127] A result of Formula (11) is substituted into the equation (6), and the phase encoding process is completed.
[0128] With reference to the foregoing embodiments,
[0129] S501: Determine, based on a plurality of to-be-encoded phases, a quantity of a plurality of bits needed for encoding the plurality of phases.
[0130] The method may be performed by a communication device. In other words, this embodiment of the present disclosure may be executed by the communication device. For example, the communication device may include devices such as a base station, an RIS, and a router. A specific type of the communication device is not limited in this embodiment of the present disclosure.
[0131] A quantity of the plurality of to-be-encoded phases may be determined based on an actual communication requirement. Generally, the quantity of the plurality of to-be-encoded phases may be 2 to the power of N, that is, 2.sup.N. The 2.sup.N to-be-encoded target phases may be marked with a vector P=[1, . . . , .sub.2.sub.
[0132] In this embodiment of the present disclosure, when the quantity of to-be-encoded phases is 2.sup.N, the quantity of bits needed for encoding the 2.sup.N phases is N. The N bits may be represented as s.sub.1, s.sub.2, . . . , and s.sub.N.
[0133] S502: Generate first-order terms and higher-order terms of the plurality of bits.
[0134] In this embodiment of the present disclosure, the first-order terms and the higher-order terms of the plurality of bits may be separately generated. The first-order term of each bit may be the bit. For example, if the N bits are respectively s.sub.1, s.sub.2, . . . , and s.sub.N, all first-order terms are s.sub.1, s.sub.2, . . . , and s.sub.N.
[0135] For the higher-order terms, all higher-order terms including a second-order product term to an N-order product term may be obtained by multiplying the bits one by one. A higher-order term of any order may include product terms of the plurality of bits, and bits in a same product term are different from each other.
[0136] For example, for the N bits s.sub.1, s.sub.2, . . . , and s.sub.N in the foregoing example, second-order terms of the N bits may include
third-order terms may include
and N-order terms may include
[0137] During specific implementation, an order of a to-be-generated higher-order term may be first determined, and then a quantity of higher-order terms with the order is determined, so that all higher-order terms of a corresponding order may be obtained by multiplying the bits one by one based on the quantity of terms.
[0138] S503: Construct a bit matrix based on the plurality of phases, the first-order terms, and the higher-order terms, where the bit matrix includes a plurality of value combinations of the plurality of bits.
[0139] The bit matrix in this embodiment of the present disclosure may be the bit matrix s.sub.N in the foregoing embodiments. A system of linear equations may be constructed based on the plurality of to-be-encoded phases and all first-order terms and higher-order terms of the plurality of bits, and then the bit matrix S.sub.N is determined based on the system of linear equations.
[0140] In this embodiment of the present disclosure, a quantity of equations included in the system of linear equations is equal to the quantity of the plurality of phases, expressions of to-be-encoded phases on one side of equal signs of the plurality of equations are different from each other, expressions of all the first-order terms and higher-order terms of the plurality of bits on the other side of the equal signs of the plurality of equations are the same, the first-order term and the higher-order term in each equation have coefficients respectively, and all coefficients form an encoding coefficient used for subsequent encoding.
[0141] In a possible implementation of this embodiment of the present disclosure, if rotation angles of the plurality of to-be-encoded phases are equally spaced, a half of the phases may be obtained by rotating the other half of the phases by 180, that is, the other half of the phases may be obtained by multiplying the half of the phases by 1. Therefore, if the rotation angles of the plurality of to-be-encoded phases are equally spaced, when the higher-order terms are actually generated, the higher-order terms of odd-numbered orders may be extracted, and then the system of linear equations is constructed based on the plurality of to-be-encoded phases and all the first-order terms and the higher-order terms of the odd-numbered orders of the plurality of bits, to simplify a calculation process.
[0142] In this embodiment of the present disclosure, when the bit matrix is determined based on the system of linear equations, a value of any bit may be first determined, and then values of other bits are generated based on the value of the any bit, to obtain the plurality of value combinations of the plurality of bits. The plurality of value combinations of the plurality of bits jointly form the bit matrix.
[0143] In a possible implementation of this embodiment of the present disclosure, the values of the any bit and the other bits may be 1 or 1.
[0144] S504: Calculate a plurality of encoding coefficients based on the bit matrix and the plurality of phases.
[0145] In this embodiment of the present disclosure, to calculate the encoding coefficients, a phase vector including the plurality of to-be-encoded phases may be first determined. For example, the phase vector may be represented as a vector P=[.sub.1, . . . , .sub.2.sub.
[0146] S505: Encode the plurality of phases by using the plurality of encoding coefficients.
[0147] The to-be-encoded phase may be encoded by using the calculated encoding coefficients.
[0148] The phase encoding method provided in this embodiment of the present disclosure may be applied to a plurality of communication scenarios. For example, in each communication device that needs to perform beamforming, phase encoding may be performed by using the method. For example, in a beamforming process of the base station, the reconfigurable intelligent surface, or the router, the method may be used for encoding. Alternatively, in any communication scenario, if a signal is a discrete value, the method may also be used for encoding. Alternatively, in any other scenario including but not limited to a communication scenario, if a discrete value needs to be encoded, the method may also be used for encoding. For example, in any scenario, if an object that needs to be encoded is a discrete value, the method may also be used for encoding. In other words, the phase encoding method provided in this embodiment of the present disclosure may be applied to not only a communication scenario, but also a non-communication scenario, and not only a phase may be encoded, but also another discrete encoding object may be encoded.
[0149]
[0150]
[0151] The phase encoding method provided in this embodiment of the present disclosure is used for encoding, so that a good effect can be achieved in a subsequent beamforming task.
[0152] In addition, the phase encoding method provided in this embodiment of the present disclosure is combined with the quantum heuristic algorithm, so that it takes only several seconds to complete weight optimization of a thousand-level array scale. Table 1 shows time needed for optimizing quantities of elements of four different array scales and quantities of bits of single-antenna elements.
TABLE-US-00001 TABLE 1 240 array 1024 array 240 array 1024 array elements elements elements elements (m = 24, (m = 64, (m = 24, (m = 64, n = 10); n = 32); n = 10); n = 32); Array scale sn = 3 sn = 3 sn = 4 sn = 4 Optimization 2 s 20 s 10 s 40 s time t
[0153] m and n respectively represent a quantity of elements in a vertical direction and a quantity of elements in a horizontal direction, sn represents the quantity of bits of the single-antenna element, and a unit of the optimization time t is second(s).
[0154] In embodiments of the present disclosure, functional modules of a communication device may be obtained through division based on the foregoing method examples. For example, each functional module may be obtained through division based on each corresponding function, or one or more functions may be integrated into one functional module. The integrated module may be implemented in a form of hardware, or may be implemented in a form of a software functional module. It should be noted that, in embodiments of the present disclosure, module division is an example, and is merely a logical function division. In actual implementation, another division manner may be used. An example in which each functional module is obtained through division based on each corresponding function is used below for description.
[0155] Corresponding to the foregoing embodiments,
[0156] The determining module 901 is configured to determine, based on a plurality of to-be-encoded phases, a quantity of a plurality of bits needed for encoding the plurality of phases.
[0157] The generation module 902 is configured to generate first-order terms and higher-order terms of the plurality of bits.
[0158] The construction module 903 is configured to construct a bit matrix based on the plurality of phases, the first-order terms, and the higher-order terms, where the bit matrix includes a plurality of value combinations of the plurality of bits.
[0159] The calculation module 904 is configured to calculate a plurality of encoding coefficients based on the bit matrix and the plurality of phases.
[0160] The encoding module 905 encodes the plurality of phases by using the plurality of encoding coefficients.
[0161] In a possible implementation of this embodiment of the present disclosure, when a quantity of the plurality of phases is 2.sup.N, the quantity of bits needed for encoding the 2.sup.N phases is N.
[0162] In a possible implementation of this embodiment of the present disclosure, the generation module 902 may be specifically configured to: [0163] generate a first-order term of each bit, where the first-order term may be the bit; and [0164] multiply the bits one by one to obtain the higher-order terms including a second-order product term to an N-order product term, where N is a quantity of the plurality of bits, a higher-order term of any order may include product terms of the plurality of bits, and bits in a same product term are different from each other.
[0165] In this embodiment of the present disclosure, the generation module 902 may be further configured to: determine an order of a to-be-generated higher-order term; determine a quantity of higher-order terms with the order; and multiply the bits one by one based on the quantity of terms to obtain the higher-order terms with the order.
[0166] In this embodiment of the present disclosure, when a quantity of the plurality of bits is N and the order is X, the quantity of higher-order terms with the order is
[0167] In a possible implementation of this embodiment of the present disclosure, the construction module 903 may be specifically configured to: construct a system of linear equations based on the plurality of phases, the first-order terms, and the higher-order terms; and determine the bit matrix based on the system of linear equations.
[0168] A quantity of equations included in the system of linear equations is equal to the quantity of the plurality of phases, expressions of the phases on one side of equal signs of the plurality of equations are different from each other, expressions of the first-order terms and the higher-order terms on the other side of the equal signs of the plurality of equations are the same, the first-order term and the higher-order term in each equation have coefficients respectively, and the coefficients form the encoding coefficients.
[0169] In this embodiment of the present disclosure, the construction module 903 may be further configured to: if rotation angles of the plurality of phases are equally spaced, extract the higher-order terms of odd-numbered orders; and construct the system of linear equations based on the plurality of phases, the first-order terms, and the higher-order terms of the odd-numbered orders.
[0170] In this embodiment of the present disclosure, the construction module 903 may be further configured to: determine a value of any bit; and generate values of other bits based on the value of the any bit, to obtain the plurality of value combinations of the plurality of bits, where the plurality of value combinations form the bit matrix.
[0171] In a possible implementation of this embodiment of the present disclosure, the values of the any bit and the other bits are 1 or 1.
[0172] In a possible implementation of this embodiment of the present disclosure, the calculation module 904 may be specifically configured to: determine a phase vector including the plurality of phases; calculate a product of a transpose of the phase vector and an inverse matrix of the bit matrix, to obtain a transpose of a coefficient vector including the plurality of encoding coefficients; and determine the plurality of encoding coefficients based on the transpose of the coefficient vector.
[0173] It should be noted that all related content of the steps in the foregoing method embodiments may be cited in function description of corresponding functional modules. Details are not described herein again.
[0174] An embodiment of the present disclosure further provides a chip. The chip includes a processor. The processor may be a general purpose processor, or may be a dedicated processor. The processor is configured to support a communication device in performing the foregoing related steps, to implement the phase encoding method in the foregoing embodiments.
[0175] Optionally, the chip further includes a transceiver. The transceiver is configured to receive control from the processor, and is configured to support the communication device in performing the foregoing related steps, to implement the phase encoding method in the foregoing embodiments.
[0176] Optionally, the chip may further include a storage medium.
[0177] It should be noted that the chip may be implemented by using the following circuits or components: one or more field programmable gate arrays (FPGAs), a programmable logic device (PLD), a controller, a state machine, gate logic, a discrete hardware component, any other suitable circuit, or any combination of circuits capable of performing various functions described throughout the present disclosure.
[0178] In conclusion, it should be noted that the foregoing descriptions are merely specific implementations of the present disclosure, but are not intended to limit the protection scope of the present disclosure. Any variation or replacement within the technical scope disclosed in the present disclosure shall fall within the protection scope of the present disclosure.