Method and system for real-time implementation of wireless signal arbitrary sampling rate conversion
Patent Information
- Application Number
- CN202211281845.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-10-19
Smart Images

Figure CN115795227B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and more specifically, to a method and system for real-time arbitrary sampling rate conversion of wireless signals. Background Technology
[0002] Communication systems often require multi-sampling rate processing, making sampling rate transformation a crucial technology in communication systems. There are generally three methods for implementing sampling rate transformation: (1) linear interpolation; (2) curve fitting; and (3) fractional sampling rate transformation. Linear interpolation, in particular, simulates a straight line by connecting the original sampling rate signal into a continuous signal, and then samples the continuous signal according to the transformed sampling rate, thus achieving arbitrary sampling rate transformation. The biggest advantage of this method is its simplicity and ease of achieving efficient real-time processing, making it widely used in audio and video signal processing. However, this method also has a significant drawback: it generates spurious signals and degrades signal quality during wireless signal sampling rate transformation.
[0003] Curve fitting: This method simulates a curve to connect signals at the original sampling rate into a continuous signal, and then samples the continuous signal at the transformed sampling rate, thus achieving arbitrary sampling rate changes. The biggest advantage of this method is that the transformed signal does not generate spurious signals, and the signal quality does not deteriorate, making it an ideal method for arbitrary sampling rate changes. However, this method also has a significant drawback: the computational load is too high, making efficient real-time processing impossible. Therefore, this method is mainly used in scenarios where real-time signal processing is not critical.
[0004] Fractional sampling rate transformation (FSR): First, the sampling rate is interpolated by an integer multiple (M times). Then, filtering is performed to remove the mirror signal generated by the integer multiple (M times) interpolation, ensuring that the signal quality is not degraded. Finally, it is decimated by an integer multiple (N times). This yields an M / N fractional sampling rate transformation. The advantage of this method is that the computation is not complex and it can achieve efficient real-time processing. However, the computational complexity is related to the values of M and N. It is currently a commonly used method for real-time wireless signal sampling rate transformation. The disadvantage of this method is also obvious: it can only process sampling rate transformations with limited values of M and N in real time and cannot achieve arbitrary sampling rate transformations.
[0005] However, existing technologies mainly use two methods: linear interpolation and curve fitting. Linear interpolation leads to a large amount of spurious signals, severely degrading signal quality. While curve fitting can produce very ideal sampling rate changes, it involves matrix operations such as matrix inversion, resulting in a huge computational load and making it impossible to achieve real-time arbitrary sampling rate changes. Therefore, these methods cannot meet the requirements and cannot be used. Summary of the Invention
[0006] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method and system for real-time arbitrary sampling rate transformation of wireless signals.
[0007] A method for real-time arbitrary sampling rate conversion of wireless signals according to the present invention includes: Step S1: Calculate all coefficients in the multivariate coefficients and transform the input signal; Step S2: Calculate the corresponding intermediate data using all the coefficients and the transformed input signal sequence; Step S3: Calculate the coefficients of the corresponding cubic equation using the intermediate data; Step S4: Substitute the coefficients into the cubic equation to calculate the results of each sampling point after the sampling rate transformation.
[0008] Preferably, the length of the multivariate coefficients is determined according to the error accuracy; the higher the error accuracy requirement, the longer the coefficients of the expression.
[0009] Preferably, step S1 includes: The steps for calculating all coefficients in the multivariate coefficients are as follows: all coefficients in the multivariate coefficients H_inv are obtained through an approximation iteration method; Input signal conversion steps: Calculate the second-order difference corresponding to the input signal sequence, using the following formula:
[0010] Wherein, the y sequence is the second-order difference of the original signal sequence x before the sampling rate transformation. Input the sequence number of sequence x.
[0011] Preferably, step S2 includes: Intermediate data is calculated based on the characteristics of the arithmetic logic unit (ALU) of the CPU and DSP. The calculation formula is as follows:
[0012] in, This represents the original signal sequence before the sampling rate transformation. H_inv represents intermediate data during the calculation process and is a coefficient composed of multivariate coefficients. k represents the length of the coefficients, and n represents the index of the input x sequence; Using all coefficients and the y-sequence from the multivariate coefficients, the intermediate data can be simplified and the calculation formula is as follows:
[0013] Where i represents the sequence number of m. For calculation The intermediate data of the coefficients of the cubic equation between two points, where y represents the second difference of the original signal sequence x before the sampling rate transformation.
[0014] Preferably, through normal sampling signals The coefficients of the cubic equation are obtained by setting all of them to 1, as shown in the following formula:
[0015]
[0016]
[0017]
[0018] Where n represents the sequence number of the input signal x. , , and Let represent the coefficients of the i-th cubic term, the i-th quadratic term, the i-th linear term, and the i-th constant term in the cubic equation, respectively, and m represent intermediate data.
[0019] Substituting into the cubic equation, the formula for calculating the sampling points after sampling rate transformation is as follows:
[0020] This leads to the results of each sampling point after the sampling rate transformation.
[0021] A system for real-time arbitrary sampling rate conversion of wireless signals, provided by the present invention, includes: Module M1: Calculates all coefficients in the multivariate coefficient model and transforms the input signal; Module M2: Calculates the corresponding intermediate data using all the coefficients and the transformed input signal sequence; Module M3: Calculates the coefficients of the corresponding cubic equation using the intermediate data; Module M4: Substitute the coefficients into the cubic equation to calculate the results of each sampling point after the sampling rate transformation.
[0022] Preferably, the length of the multivariate coefficients is determined according to the error accuracy; the higher the error accuracy requirement, the longer the coefficients of the expression.
[0023] Preferably, it includes: The module for calculating all coefficients in the multivariate coefficients: obtains all coefficients in the multivariate coefficients H_inv through an approximation iteration method; Input signal conversion module: Calculates the second-order difference corresponding to the input signal sequence, using the following formula:
[0024] Wherein, the y sequence is the second-order difference of the original signal sequence x before the sampling rate transformation. Input the sequence number of sequence x.
[0025] Preferably, module M2 includes: Intermediate data is calculated based on the characteristics of the arithmetic logic unit (ALU) of the CPU and DSP. The calculation formula is as follows:
[0026] in, This represents the original signal sequence before the sampling rate transformation. H_inv represents intermediate data during the calculation process and is a coefficient composed of multivariate coefficients. k represents the length of the coefficients, and n represents the index of the input x sequence; Using all coefficients and the y-sequence from the multivariate coefficients, the intermediate data can be simplified and the calculation formula is as follows:
[0027] Where i represents the sequence number of m, and y represents the second-order difference of the original signal sequence x before the sampling rate transformation.
[0028] Preferably, through normal sampling signals The coefficients of the cubic equation are obtained by setting all of them to 1, as shown in the following formula:
[0029]
[0030]
[0031]
[0032] Where n represents the sequence number of the input signal x. , , and Let represent the coefficients of the i-th cubic term, the i-th quadratic term, the i-th linear term, and the i-th constant term in the cubic equation, respectively, and m represent intermediate data.
[0033] Substituting into the cubic equation, the formula for calculating the sampling points after sampling rate transformation is as follows:
[0034] This leads to the results of each sampling point after the sampling rate transformation.
[0035] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention improves the curve fitting algorithm by approximating the curve, reducing the computational workload and saving costs by simplifying the calculation process to only a small number of multiplications and additions within a certain error range.
[0036] 2. This invention achieves real-time wireless signal sampling rate arbitrarily changing processing by independently implementing segmented parallel processing before and after signal processing, and the continuity and quality of the signal are good after the sampling rate change.
[0037] 3. The present invention uses Matlab simulation to compare the error of normal curve fitting calculation with the algorithm with H_inv as the 7th order coefficient in the technical solution of the present invention, and performs error analysis to prove that the calculation result of the present invention has very small error. Attached Figure Description
[0038] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic diagram of the workflow of the present invention.
[0039] Figure 2 This is a time-domain diagram of the signal before QPSK sampling rate conversion in this invention.
[0040] Figure 3 This is a time-domain diagram of the signal after the QPSK modulation method in this invention is transformed to a sampling rate of 75MHz.
[0041] Figure 4 This is the frequency domain diagram of the signal before QPSK sampling rate conversion in this invention.
[0042] Figure 5 This is the frequency domain diagram of the signal after the QPSK modulation method in this invention is transformed to a sampling rate of 75MHz. Detailed Implementation
[0043] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the scope of protection of the present invention.
[0044] This invention aims to achieve real-time arbitrary switching of wireless signal sampling rates. While curve fitting algorithms can achieve highly ideal arbitrary switching of wireless signal sampling rates, their large computational load and inability to perform parallel computation prevent them from achieving real-time arbitrary switching of sampling rates. Therefore, this invention improves the curve fitting algorithm through approximate transformation, reducing the computation process to only a few multiplications and additions within a certain error range. Furthermore, the signal processing steps are independent, allowing for segmented parallel processing. Ultimately, real-time arbitrary switching of wireless signal sampling rates is achieved on a CPU or DSP.
[0045] In order to balance the computational load and the performance of arbitrary sampling rate changes, the technical solution of this invention is based on the cubic curve fitting algorithm, and its calculation process is improved.
[0046] First, let's explain the normal calculation process of the cubic curve fitting algorithm. Let the original signal sequence before the sampling rate transformation be: In this way, the original signal sequence can be divided into n smaller segments: Each interval can be fitted with a cubic equation: Each interval has 4 unknowns. There are n intervals, resulting in 4n unknowns. We need to solve for these 4n unknowns. Solving the equation requires that the curve be smooth and continuous, meaning the first and second derivatives of the curve must also be continuous. In addition, the boundary conditions need to be defined for the equation to be solvable. The technical solution of this invention uses non-knotted boundary conditions for solving, meaning the third derivative of the first point is equal to the third derivative of the second point, and the third derivative of the last point is equal to the third derivative of the second-to-last point.
[0047] Here we directly present the result of solving the equation, from which we can obtain a recursive expression:
[0048]
[0049]
[0050]
[0051]
[0052] in, The original signal sequence before sampling rate conversion. The step size of the original signal sequence before sampling rate conversion, and the normal sampling signal. Both are equal to 1; This is an intermediate result in the calculation process. This refers to the unknowns that need to be solved in the end.
[0053] Based on the derivation results above, it can be seen that it is necessary to find... First, you need to solve the intermediate calculation results. Calculation results The process requires working with the matrix: Performing the inverse operation is not only computationally intensive, but also requires all sampling points to participate in the calculation.
[0054] The technical solution of this invention modifies this calculation step based on the characteristics of the arithmetic logic unit (ALU) of CPUs and DSPs. The modified calculation formula will produce a certain error compared to the original formula; the higher the accuracy requirement for this error, the longer the coefficients of the calculation formula should be. Specifically, as follows: According to the present invention, a method for real-time arbitrary sampling rate transformation of wireless signals is provided, such as... Figure 1 As shown, it includes: Step S1: Calculate all coefficients in the multivariate coefficient set and transform the input signal. The length of the multivariate coefficient set is determined based on the error precision; the higher the error precision requirement, the longer the coefficients in the calculation expression. Step S1 includes: The steps for calculating all coefficients in the multivariate coefficients are as follows: All coefficients in the multivariate coefficients H_inv are obtained through approximation iteration.
[0055] Input signal conversion steps: Calculate the second-order difference corresponding to the input signal sequence, using the following formula:
[0056] Wherein, the y sequence is the second-order difference of the original signal sequence x before the sampling rate transformation. Input the sequence number of sequence x.
[0057] Step S2: Using all the coefficients and the transformed input signal sequence, calculate the corresponding intermediate data. Step S2 includes: Intermediate data is calculated based on the characteristics of the arithmetic logic unit (ALU) of the CPU and DSP. The calculation formula is as follows:
[0058] in, This represents the original signal sequence before the sampling rate transformation. H_inv represents intermediate data during the calculation process and is a coefficient composed of multivariate coefficients. , k represents the length of the coefficients, and n represents the index of the input x sequence.
[0059] Therefore, solving the intermediate results The process can be simplified to and The convolution operation, using all coefficients and the y sequence in the multivariate coefficients, simplifies the calculation of intermediate data. The calculation formula is as follows:
[0060] Where i represents the sequence number of m. For calculation The intermediate data of the coefficients of the cubic equation between two points, where y represents the second difference of the original signal sequence x before the sampling rate transformation.
[0061] This is how to solve the intermediate results. The process does not require all sampling points to participate in the calculation together; instead, each point can be calculated independently. This allows for full utilization of multi-core CPUs or DSPs for parallel processing. Furthermore, since matrix inversion is replaced, the computational load of the entire process is significantly reduced, enabling fully real-time processing.
[0062] Step S3: After calculating Then, the coefficients of the corresponding cubic equation are calculated using the intermediate data. This is done through normal sampling signals. The coefficients of the cubic equation are obtained by setting all of them to 1, as shown in the following formula:
[0063]
[0064]
[0065]
[0066] Where n represents the sequence number of the input signal x. , , and Let represent the coefficients of the i-th cubic term, the i-th quadratic term, the i-th linear term, and the i-th constant term in the cubic equation, respectively, and m represent intermediate data.
[0067] Step S4: Substitute the coefficients into the cubic equation to calculate the results for each sampling point after the sampling rate transformation. The calculation formula for the sampling points after the sampling rate transformation is as follows:
[0068] This leads to the results of each sampling point after the sampling rate transformation.
[0069] Furthermore, taking H_inv as a 7th-order coefficient as an example, in calculating intermediate results... The process involves only 7 multiplication and addition operations at each point, in the calculation Each point in the process requires only 1 multiplication and 4 addition operations, and each point in the final sampling rate output requires only 6 multiplications and 3 addition operations. This computational complexity is even less than that of the fractional sampling rate transformation method.
[0070] Using Matlab simulation to compare the normal curve fitting algorithm with the algorithm using the 7th order coefficient H_inv in the technical solution of this invention, the error was only 0.115%, which can be considered as no error in a system using a 12-bit DAC.
[0071] In practice, the algorithm with H_inv as the 7th order coefficient in this invention is implemented in TI's DSP chip C6678. For a signal with a symbol rate of 1MHz, a modulation method of QPSK, and a duration of 10ms, the sampling rate is transformed to 75MHz using the algorithm with H_inv as the 7th order coefficient in this invention. The computation time using a single core is 11.2ms, and the computation time using 8 cores in parallel computation is 1.5ms, which can fully realize real-time computation.
[0072] like Figure 2 and Figure 3 As shown, the signal after sampling rate conversion to 75MHz using the technical solution of this invention is very smooth and has excellent continuity. Figure 4 and Figure 5 As shown, the signal after sampling rate conversion to 75MHz using the technical solution of this invention does not exhibit any spurious signals in the frequency domain, the sampling rate conversion does not cause signal quality degradation, and the signal quality is excellent.
[0073] The technical solution of this invention can easily implement a parallel processing structure. Therefore, when it is necessary to process large sampling rate changes, such as 1GHz, multiple DSPs can be used in parallel, or a 64-core CPU can be used to achieve real-time arbitrary changes in the sampling rate of wireless signals.
[0074] The present invention also provides a system for real-time arbitrary sampling rate transformation of wireless signals. Those skilled in the art can implement the system for real-time arbitrary sampling rate transformation of wireless signals by executing the steps of the method described above. That is, the method for real-time arbitrary sampling rate transformation of wireless signals can be understood as a preferred embodiment of the system for real-time arbitrary sampling rate transformation of wireless signals.
[0075] A system for real-time arbitrary sampling rate conversion of wireless signals, provided by the present invention, includes: Module M1: Calculates all coefficients in the multivariate coefficients and transforms the input signal. The length of the multivariate coefficients is determined by the error precision; the higher the error precision requirement, the longer the coefficients in the expression. Includes: a module for calculating all coefficients in the multivariate coefficients: obtains all coefficients in the multivariate coefficients H_inv through approximation iteration; Input signal conversion module: Calculates the second-order difference corresponding to the input signal sequence, using the following formula:
[0076] Wherein, the y sequence is the second-order difference of the original signal sequence x before the sampling rate transformation. Input the sequence number of sequence x.
[0077] Module M2: Calculates the corresponding intermediate data using all the coefficients and the transformed input signal sequence. Module M2 includes: Intermediate data is calculated based on the characteristics of the arithmetic logic unit (ALU) of the CPU and DSP. The calculation formula is as follows:
[0078] in, This represents the original signal sequence before the sampling rate transformation. H_inv represents intermediate data during the calculation process and is a coefficient composed of multivariate coefficients. k represents the length of the coefficients, and n represents the index of the input x sequence; Using all coefficients and the y-sequence from the multivariate coefficients, the intermediate data can be simplified and the calculation formula is as follows:
[0079] Where i represents the sequence number of m. For calculation The intermediate data of the coefficients of the cubic equation between two points, where y represents the second difference of the original signal sequence x before the sampling rate transformation.
[0080] Module M3: Calculates the coefficients of the corresponding cubic equation using the intermediate data. This is done through normal sampling signals. The coefficients of the cubic equation are obtained by setting all of them to 1, as shown in the following formula:
[0081]
[0082]
[0083]
[0084] Where n represents the sequence number of the input signal x. , , and Let represent the coefficients of the i-th cubic term, the i-th quadratic term, the i-th linear term, and the i-th constant term in the cubic equation, respectively, and m represent intermediate data.
[0085] Module M4: Substitute the coefficients into the cubic equation to calculate the results for each sampling point after the sampling rate transformation. The calculation formula for the sampling points after the sampling rate transformation is as follows:
[0086] This leads to the results of each sampling point after the sampling rate transformation.
[0087] Those skilled in the art will understand that, in addition to implementing the system, apparatus, and their modules provided by this invention in purely computer-readable program code, the same program can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system, apparatus, and their modules provided by this invention can be considered a hardware component, and the modules included therein for implementing various programs can also be considered structures within the hardware component; alternatively, modules for implementing various functions can be considered both software programs implementing the method and structures within the hardware component.
[0088] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. A method for real-time arbitrary sampling rate conversion of wireless signals, characterized in that, include: Step S1: Obtain the original signal sequence x before sampling rate conversion, calculate all coefficients in the multivariate coefficients, and perform input signal conversion; Step S2: Obtain the corresponding intermediate data sequence m by performing convolution calculation on the multivariate coefficient sequence and the transformed input signal sequence y; Step S3: Using the intermediate data sequence m and the original signal sequence x, calculate the coefficients of each term in the piecewise cubic equation used to fit the signal, where is used to calculate the fitting sampling points. and When determining the coefficients of the i-th piecewise cubic equation within the interval, the i-th data in the intermediate data sequence is used. ; Step S4: Substitute the current sampling point into the corresponding piecewise cubic equation to calculate the result of each sampling point after the sampling rate transformation; The method is implemented through parallel computing on a multi-core CPU or DSP. Step S2 includes: Intermediate data is calculated based on the characteristics of the arithmetic logic unit (ALU) of the CPU and DSP. The calculation formula is as follows: in, This represents the original signal sequence before the sampling rate transformation. H_inv represents intermediate data during the calculation process and is a coefficient composed of multivariate coefficients. k represents the length of the coefficients, and n represents the index of the input x sequence; The convolution calculation includes: simplifying the calculation of intermediate data using all coefficients and the y sequence in the multivariate coefficients, as shown in the following formula: Where i represents the sequence number of m. For calculation The intermediate data of the coefficients of the cubic equation between two points, where y represents the second difference of the original signal sequence x before the sampling rate transformation.
2. The method for real-time arbitrary sampling rate transformation of wireless signals according to claim 1, characterized in that, The length of the multivariate coefficients is determined based on the error precision; the higher the error precision requirement, the longer the coefficients of the expression.
3. The method for real-time arbitrary sampling rate transformation of wireless signals according to claim 2, characterized in that, Step S1 includes: The steps for calculating all coefficients in the multivariate coefficients are as follows: all coefficients in the multivariate coefficients H_inv are obtained through an approximation iteration method; Input signal conversion steps: Calculate the second-order difference corresponding to the input signal sequence, using the following formula: Wherein, the y sequence is the second-order difference of the original signal sequence x before the sampling rate transformation. Input the sequence number of sequence x.
4. A system for real-time arbitrary sampling rate conversion of wireless signals, characterized in that, include: Module M1: Acquires the original signal sequence x before sampling rate conversion, calculates all coefficients in the multivariate coefficients, and performs input signal conversion; Module M2: Obtains the corresponding intermediate data sequence m by performing convolution calculation on the multivariate coefficient sequence and the transformed input signal sequence y; Module M3: Using the intermediate data sequence m and the original signal sequence x, calculate the coefficients of each term in the piecewise cubic equation used to fit the signal, where is used to calculate the fitting sampling points. and When determining the coefficients of the i-th piecewise cubic equation within the interval, the i-th data in the intermediate data sequence is used. ; Module M4: Substitutes the current sampling point into the corresponding piecewise cubic equation to calculate the result of each sampling point after the sampling rate transformation; The system is implemented through parallel computing on a multi-core CPU or DSP. Module M2 includes: Intermediate data is calculated based on the characteristics of the arithmetic logic unit (ALU) of the CPU and DSP. The calculation formula is as follows: in, This represents the original signal sequence before the sampling rate transformation. H_inv represents intermediate data during the calculation process and is a coefficient composed of multivariate coefficients. k represents the length of the coefficients, and n represents the index of the input x sequence; The convolution calculation includes: simplifying the calculation of intermediate data using all coefficients and the y sequence in the multivariate coefficients, as shown in the following formula: Where i represents the sequence number of m. For calculation The intermediate data of the coefficients of the cubic equation between two points, where y represents the second difference of the original signal sequence x before the sampling rate transformation.
5. The system for real-time arbitrary sampling rate conversion of wireless signals according to claim 4, characterized in that, The length of the multivariate coefficients is determined based on the error precision; the higher the error precision requirement, the longer the coefficients of the expression.
6. The system for real-time arbitrary sampling rate conversion of wireless signals according to claim 5, characterized in that, Module M1 includes: The module for calculating all coefficients in the multivariate coefficients: obtains all coefficients in the multivariate coefficients H_inv through an approximation iteration method; Input signal conversion module: Calculates the second-order difference corresponding to the input signal sequence, using the following formula: Wherein, the y sequence is the second-order difference of the original signal sequence x before the sampling rate transformation. Input the sequence number of sequence x.
Citation Information
Patent Citations
Time domain waveform recovery method based on cable frequency domain reflection
CN113589109A
Methods and Apparatus for Enhancing Optical Images and Parametric Databases
US20190385288A1