Method for arbitrary multiple sampling rate conversion in a software radio system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIHANG UNIV
- Filing Date
- 2023-06-30
- Publication Date
- 2026-08-07
AI Technical Summary
虽然通用处理器的计算资源受限,但一般具有较大的存储资源(计算机内存或GPU显存),可以牺牲存储效率来提高计算效率,这一点是与硬件处理设计思想上的根本不同
[0017] 1. The method for arbitrary sampling rate conversion in a software-defined radio system of the present invention divides the signal into segments. Based on the length of the segmented data blocks, the coefficients of the reconstruction filter required for each new sampling moment within the data block, as well as the old sampling moments involved in the filter input, are calculated in advance and stored. Subsequent data blocks reuse these two arrays for filtering operations. Because the filter coefficients are known, the computational complexity of time-varying coefficient resampling filtering is comparable to that of a conventional time-invariant low-pass filter, only 1/N of that of a Farrow structure resampling filter. The increased storage space required is entirely manageable for modern computers.
Smart Images

Figure CN116760414B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for arbitrary multiple sampling rate conversion in a software radio system, belonging to the technical field of wireless communication. Background Technology
[0002] In traditional radio product development, radio frequency (RF) and baseband processing are implemented using analog and digital circuits in dedicated chips, with fixed signal parameters and processing procedures. When new technologies emerge or versions need upgrading, new dedicated chips must be developed to support them. However, in software-defined radio (SDR) communication systems, analog-to-digital (A / D) and digital-to-analog (AD / DA) conversions are moved as close to the antenna as possible. Signal generation, modulation / demodulation, channel encoding / decoding, and other signal processing procedures, as well as the protocol stack, are all implemented in software, eliminating the need for hardware circuitry. Because SDR offers reconfigurable characteristics, it provides significant flexibility for product development and scientific research.
[0003] Different communication systems or air interface protocols have different transmission rates, corresponding to different symbol rates or master clock rates. Replacing the master crystal oscillator every time the radio is reconfigured is clearly unacceptable. Therefore, in software-defined radio systems, the sampling frequency of the AD / DA converter is often fixed, and then the software calculates the required specific sampling rate using digital sampling rate conversion. At the receiver, the data is typically converted from the original AD sampling rate to an integer multiple of the symbol rate before demodulation. At the transmitter, the data generated by digital modulation is often an integer multiple of the symbol rate; this data must be converted to the DA sampling rate before being sent to the radio frequency unit for processing and transmission.
[0004] If the new sampling rate is an integer multiple or fraction of the AD / DA sampling frequency, the commonly used upsampling (interpolation) and downsampling (decimation) methods in digital signal processing can complete the sampling rate conversion. If the relationship between the old and new sampling rates is the ratio of two simple integers, such as 3 / 5, then the sampling rate conversion can be achieved by first upsampling by a factor of 3 and then downsampling by a factor of 5. However, if the ratio of the old and new sampling rates is a complex rational number, such as 1.117, then upsampling by a factor of 1117 and then downsampling by a factor of 1000 is a very inefficient implementation. Furthermore, if the ratio of the old and new sampling rates is an irrational number, such as... If the sample size is increased by a factor of 1, then this method of combining increasing and decreasing samples becomes completely inapplicable.
[0005] For sampling rate conversion at arbitrary multiples, a common approach is to use a time-varying low-pass filter with a Farrow structure for resampling. This involves calculating the coefficients of the reconstructed filter in real-time for each new sampling time, then convolving them with the data from the old sampling rate to obtain the interpolated data for the new sampling time. To reduce computational complexity, the Farrow structure uses piecewise polynomial fitting to approximate the time-domain response of the reconstructed filter and employs nested computation to reduce the complexity of exponentiation. Thus, when using an Nth-order polynomial to fit the reconstructed filter, the computational cost of resampling is approximately N times that of a typical low-pass filter.
[0006] For digital circuit-based sampling rate conversion systems, the Farrow architecture is a good choice. It only requires an N-fold increase in multiply-accumulate units, and real-time computation can be achieved through parallel processing without increasing processing time. However, for software-implemented sampling rate conversion systems, all computations are performed on the CPU or GPU. An N-fold increase in computational load will lead to an N-fold increase in processing time.
[0007] Software-defined radio platforms based on general-purpose processors use commercial CPU / GPU servers or ordinary personal computers as signal processing platforms. They can be developed using general-purpose high-level languages (such as C / C++), offering greater flexibility. Although general-purpose processors have limited computing resources, they generally have large storage resources (computer memory or GPU video memory), allowing for the sacrifice of storage efficiency to improve computing efficiency. This is a fundamental difference from the design philosophy of hardware processing. Summary of the Invention
[0008] To address the aforementioned problems, this invention proposes a method for arbitrary multiple sampling rate conversion in a software radio system, which can realize real-time digital conversion between any two sampling rates of a signal.
[0009] The method for arbitrary sampling rate conversion in a software-defined radio system of the present invention includes a data preparation stage and a real-time signal processing stage, specifically as follows:
[0010] The preparation phase includes:
[0011] Establish a first storage table to store the coefficients of the reconstruction filter corresponding to each new sampling time.
[0012] A second storage table is created to store the old sampling times corresponding to the input data of the reconstruction filter.
[0013] The real-time signal processing stage:
[0014] For the input data stream at the old sampling rate, it is segmented according to the period T; for each new sampling moment within the signal period, the corresponding reconstruction filter coefficients and the corresponding old sampling moment are read from the two storage tables, the input data at the old sampling rate is read, and the output data at the new sampling rate is calculated.
[0015] Using two storage tables, the above processing is performed on all segments to obtain the resampled signal.
[0016] The advantages of this invention are:
[0017] 1. The method for arbitrary sampling rate conversion in a software-defined radio system of the present invention divides the signal into segments. Based on the length of the segmented data blocks, the coefficients of the reconstruction filter required for each new sampling moment within the data block, as well as the old sampling moments involved in the filter input, are calculated in advance and stored. Subsequent data blocks reuse these two arrays for filtering operations. Because the filter coefficients are known, the computational complexity of time-varying coefficient resampling filtering is comparable to that of a conventional time-invariant low-pass filter, only 1 / N of that of a Farrow structure resampling filter. The increased storage space required is entirely manageable for modern computers.
[0018] 2. The method for converting arbitrary multiple sampling rates in a software-defined radio system according to the present invention can realize the conversion from one sampling rate to another arbitrary sampling rate with very low complexity, thereby meeting the real-time processing requirements of the software-defined radio system. Attached Figure Description
[0019] Figure 1 This is a flowchart of the method for arbitrary multiple sampling rate conversion in the software radio system of the present invention;
[0020] Figure 2 This is a comparison of filter coefficients when the rectangular window is truncated and the Blackman window is truncated in the embodiments of the present invention;
[0021] Figure 3 These are the signal waveforms and spectra before and after downsampling in this embodiment of the invention;
[0022] Figure 4 These are the signal waveforms and spectra before and after upsampling in this embodiment of the invention;
[0023] Figure 5 This is the resampling effect after reducing the number of truncated points in the filter in the embodiments of the present invention;
[0024] Figure 6 This is the resampling effect after increasing the number of truncated points in the filter in this embodiment of the invention;
[0025] Figure 7This is the resampling effect after applying a Blackman window to the filter impulse response in this embodiment of the invention;
[0026] Figure 8 This is the effect of irrational multiple sampling rate conversion in the embodiments of the present invention. Specific Implementation
[0027] The present invention will now be described in further detail with reference to the accompanying drawings.
[0028] For a digital signal, to obtain a signal from a sampling rate f s The conversion yields another sampling rate f s ', we can first process the digital signal through a sampling rate of f s The DA obtains an analog signal, which is then sampled at a rate of f. s The AD converter obtains a new digital signal. However, this operation is very complex because it requires the participation of hardware AD / DA (and the underlying clock control, etc.). Therefore, pure digital processing methods are generally used for sampling rate conversion in software-defined radio systems.
[0029] The idea behind sampling rate conversion using purely digital processing methods is to first reconstruct a digital signal at one sampling rate into an analog signal, and then sample the reconstructed analog signal at another sampling rate. However, by combining these two steps, it becomes clear that it's not necessary to actually convert the digital signal to an analog signal. Instead, the digital signal at the old sampling rate can be directly calculated from the digital signal at the new sampling rate using a digital reconstruction filter with time-varying coefficients.
[0030] Assuming the old sampling rate f s =1 / T s Let the discrete-time digital signal be x[n]. Using the following impulse train signal x s (t) is used to recover the continuous-time signal.
[0031]
[0032] In the formula, T s t is the old sampling period; n is the index of the discrete-time digital signal x[n], taking only integers; t is the continuous time; δ(·) is the impulse function.
[0033] The reconstruction filter is a continuous-time ideal low-pass filter, and its impulse response is:
[0034]
[0035] Among them, Ω c To reconstruct the bandwidth of the filter, we take Ω here. c =π / T s The reconstructed continuous-time signal is then:
[0036]
[0037] In the formula, the symbol "*" represents the convolution operation, and Sa(·) is the sampling function;
[0038] Based on the above derivation, x is reconstructed by interpolation using the Sa function. c (t) after that, then x c (t) at the new sampling rate Sampling, i.e.:
[0039]
[0040] Where y[m] represents the reconstructed data at the new sampling rate; m is the index of the data at the new sampling rate; T s ′ represents the new sampling period; r is the sampling rate conversion factor.
[0041] From the above equation, we can deduce that the discrete-time reconstruction filter is an infinitely long time-varying coefficient filter, and its expression is:
[0042]
[0043] At each new sampling time mT s Each time step requires recalculating a new set of filter coefficients h[m,n]. Since it's impossible to construct infinitely long time-varying coefficients in practical applications, a window function can be used to truncate them, allowing the calculation of new sampling points using finite-length filter coefficients. Given a parameter L (set manually based on computational requirements), with a filter length of 2L+1, only 2L+1 filter coefficients need to be calculated for each new sampling time.
[0044]
[0045] In the formula, w(·) represents the window function, and the symbol is... This indicates rounding down to the nearest integer.
[0046] From the above expression and the range of variable values, it can be seen that, given the parameter L, the filter coefficients depend on the positions between samples.
[0047]
[0048] Therefore, there is
[0049]
[0050] When r is a rational number, μ m As m changes periodically, the filter coefficients can be reused in each cycle; when r is an irrational number, μ mAs m changes irregularly, the filter coefficients are different at different points m.
[0051] If the above formula is used to calculate h[m,n] in real time, the computational load is extremely high due to the inclusion of trigonometric functions and division operations. Therefore, Farrow proposed a method using piecewise polynomial fitting to calculate h[m,n] in his paper "CWFarrow, "A continuously variable digital delay element," in Proc. IEEE International Symposium on Circuits and Systems, Espoo, Finland, June 6-9, 1988, pp. 2641-2645." Given the impulse response of the filter to be fitted, the polynomial coefficients remain unchanged. As the time difference (mr-n) changes, this method only requires some multiplications to recalculate the filter coefficients.
[0052] The general form of a Farrow filter can be expressed by the following equation:
[0053]
[0054] Where N-1 is the polynomial order, M is the polynomial piecewise number, and c i (·) represents the polynomial coefficients. The above equation can be further simplified to:
[0055]
[0056] in
[0057]
[0058] In practical implementation, the above formula is usually used to calculate... Then, a nested structure is used to calculate y[m] to reduce the number of multiplication operations. Taking N=3 as an example, we have
[0059]
[0060] As can be seen, in the Farrow filter, the number of polynomial segments M is equivalent to the length 2L+1 of the time-varying reconstruction filter mentioned earlier. For N-1 order polynomial fitting, the total computational cost of the Farrow filter is approximately N(2L+1). The higher the order of the polynomial fitting, the closer the Farrow filter is to the ideal reconstruction filter, but the computational cost will also be greater.
[0061] In software-defined radio systems, computations are performed on the CPU or GPU, so increased computation leads to increased processing time. Conversely, general-purpose processing platforms typically have abundant storage resources, allowing for improved computational efficiency at the expense of storage efficiency. Therefore, the method for arbitrary sampling rate conversion in software-defined radio systems proposed in this invention segments the signal. Based on the length of the segmented data blocks, the coefficients of the reconstruction filter required for each new sampling moment within the data block, as well as the old sampling moments involved in the filter input, are pre-calculated and stored. Subsequent data blocks reuse these two arrays for filtering operations, such as... Figure 1 As shown, the specific design steps are as follows:
[0062] Step 1: Data preparation.
[0063] Given the old sampling rate f s and new sampling rate f s ', Calculate the sampling rate conversion factor r = f s / f s The signal segmentation period T is determined; the truncation length 2L+1 of the reconstruction filter and the window function w(n) used for truncation are also determined. The signal segmentation period T should generally be greater than 1000 times the symbol period to reduce discontinuities between signal segments; the truncation length 2L+1 should generally be greater than or equal to 3 to reduce signal distortion caused by the truncation effect.
[0064] Step 2: Calculate and store the coefficients of the reconstruction filter corresponding to each new sampling time, as storage table 1.
[0065] Dividing the signal into segments with a period of T, under the old sampling rate, there are a total of P = T / T. s There are sampling points, and under the new sampling rate, there are a total of P′=T / T. s There are ′ sampling points. For each new sampling time mT s ', calculate and store 2L+1 filter coefficients
[0066]
[0067] Replace the index n in h[m,n] with l, where l = 0, 1, 2, 3, ..., 2L; then shift it to the left. Points, obtained:
[0068]
[0069] This can intuitively show that the filter length is 2L+1.
[0070] Therefore, a total of P′(2L+1) filter coefficients are stored as storage table one.
[0071] Step 3: Store the old sampling times corresponding to the filter input data (old sampling rate data) as storage table 2.
[0072] For each new sampling time mT s ′, Store the old sampling time corresponding to the input data of the reconstruction filter:
[0073]
[0074] In the formula, the index m of the new sampling rate data is an integer with values of 1, 2, 3, 4...P′.
[0075] In this way, a total of P′ old sampling times are stored, which serve as storage table two.
[0076] Step 4: Process subsequent signals in real time based on storage table one and storage table two obtained in the previous steps.
[0077] (1) The input data under the old sampling rate is segmented according to the period T, and each segment is a signal block.
[0078] (2) For each new sampling time within the signal period, read the corresponding filter coefficients and the corresponding old sampling time according to the two storage tables.
[0079] (3) Read the segmented data under the old sampling rate and calculate the output data under the new sampling rate. For each new sampling time m, there is a corresponding old sampling time t[m]. Find 2L+1 data points from the input data under the old sampling rate, and these 2L+1 data points start from x[t[m]] and end at x[t[m]+2L]. Multiply these data points by the filter coefficients h′[m,l] and then sum them to obtain y[m], that is:
[0080]
[0081] (4) Process all segmented data using the above steps (2) and (3) to obtain the resampled signal.
[0082] As can be seen, since the filter coefficients are known, each new sampling point only requires 2L+1 multiplications. The computational complexity of this time-varying coefficient resampling filter is comparable to that of a regular time-invariant low-pass filter, and is only 1 / N of that of a Farrow structure resampling filter.
[0083] Since the new sampling time of each data block starts from zero, there may be some discontinuity between data blocks. Compared with continuous processing without blocks, the starting time of the signal block deviates by a maximum of T. sIn the case of oversampling, the impact of this discontinuity is minimal. However, the inherent clock skew between transceivers in wireless communication systems, and the relative motion between them causing symbol period scaling, can both outweigh the impact of discontinuities between data blocks. During demodulation, a time-off tracking loop is typically used to correct this synchronization skew. Of course, given sufficient storage space, the data block length can be increased to reduce this discontinuity; after time-off tracking and compensation, the impact of this inter-block discontinuity can be essentially ignored.
[0084] Example:
[0085] The following example illustrates the implementation effect of the method of the present invention. Consider using a certain software radio platform to build a signal transmission system. The basic process of receiving signal processing mainly includes down-conversion, low-pass filtering, resampling, demodulation, etc.
[0086] In the preparation phase, the receiver parameters are first configured, the signal segment length is set to 100ms, and the initial sampling rate f is determined. s and new sampling rate f s First, calculate the conversion factor r. Then, determine the truncated length 2L+1 of the reconstruction filter and the window function w(n). Finally, process all... Stored as a sampling timetable, and simultaneously based on μ m Calculate the 2L+1 filter coefficients corresponding to each time step and store them as a reconstructed filter coefficient table. Figure 2 Given L=10, μ m =0.25, the reconstruction filter coefficients truncated using rectangular and Blackman windows respectively. If f s =10MHz, f s If the sampling time is stored using 32-bit integers and the reconstruction filter coefficients are stored using 32-bit single-precision floating-point numbers, then the timetable and coefficient table will occupy approximately 1.28MB and 26.88MB of storage space, respectively.
[0087] During the real-time processing phase, the signal is segmented, and the baseband signal is obtained through down-conversion. Two memory tables are reused to reconstruct and filter each segment of the original signal, resulting in a resampled signal.
[0088] Figure 3 The waveforms and spectra before and after resampling when receiving a BPSK signal are given. The BPSK symbol rate is 400 kHz, the single-side bandwidth of the low-pass filter is set to 400 kHz, and the initial sampling rate f is... s =10MHz. At this point, one symbol contains 25 sampling points, but in reality, we don't need such a high oversampling rate. For easier real-time processing, we consider downsampling to f. s=3.2MHz, the reconstruction filter uses a rectangular window truncation, L=10. Resampling will produce a mirror component in the spectrum, and the spectral leakage caused by time-domain truncation will weaken the stopband attenuation capability of the reconstruction filter. Although the suppression of the mirror component here is insufficient, its attenuation relative to the main lobe is still about 40dB. As can be seen from the time-domain waveform, the resampled signal has no obvious distortion, and the presence of the mirror component does not affect subsequent demodulation processes.
[0089] Figure 4 The waveforms and spectra before and after resampling when receiving LTE signals are presented. Due to platform hardware limitations, the receiver's maximum sampling rate is only 20MHz. To facilitate subsequent processing, the signal needs to be received first at a 20MHz sampling rate, then upsampled to 30.72MHz, and the reconstruction filter uses a rectangular window truncation with L=10. Because the bandwidth of the LTE signal is larger (approximately 18MHz), it is more severely affected by image aliasing. However, comparing the signal waveforms before and after resampling reveals that the distortion level is low and will not affect subsequent processing.
[0090] For sampling rate conversions of rational multiples, a common approach is interpolation-low-pass filtering-decimation. Consider f s =10MHz, f s The current clock speed is 3.2MHz, requiring 8x interpolation and 25x decimation. On a computer using an Intel Core i7-11800H CPU, the average processing time per data block is 32ms. However, on the same computer, the average processing time of this invention is only 4.5ms, demonstrating better real-time performance. Furthermore, if the 4th-order polynomial Farrow reconstruction filter is considered, its runtime is approximately 5 times that of this invention.
[0091] For the above cases of receiving BPSK signals, taking L=5 and L=20 respectively, the resampling results are as follows: Figure 5 and Figure 6 As shown, by increasing the truncation length of the reconstruction filter, the suppression capability of the image component can be enhanced.
[0092] If stricter requirements are needed for image suppression, a window function with a smooth transition can be used to truncate the reconstruction filter. Figure 7 The following is given in f s =10MHz, f s With ′=3.2MHz and L=10, the Blackman window is used to truncate the reconstruction filter, and the signal waveforms and spectra before and after resampling are obtained. At this time, the image component is almost completely suppressed, and the image attenuation is greater than 50dB.
[0093] For sampling rate transformations of irrational multiples, the distribution of mirror components is irregular and will inevitably alias onto the main lobe of the spectrum. Therefore, windowing is also needed to fully suppress mirrors. Figure 8 The resampling results of this invention under the condition of irrational multiple sampling rate conversion are given, where f s =10MHz, L=10, and the Blackman window is used as the window function. It can be seen that the method of this invention still has good performance for sampling rate conversions with irrational multiples.
Claims
1. A method for arbitrary multiple sampling rate conversion in a software-defined radio system, characterized in that: Including the preparation stage With the real-time signal processing stage; The preparation phase includes: A first storage table is established to store the coefficients of the reconstruction filter corresponding to each new sampling time. The method for establishing the first storage table is as follows: by For periodic input signals Segmentation is performed; under the old sampling rate, there are a total of There are [number] sampling points, and a total of [number] sampling points under the new sampling rate. Each sampling point; for each new sampling time Calculate and store filter coefficients , In the formula, For indexing new sampling rate data, The value can be 1, 2, 3, 4... Integers; This is the old sampling period; This is the new sampling period; This is the sampling rate conversion factor. ; For signal The index; The window function is represented by the symbol "". " indicates rounding down; These are parameters set manually based on computational requirements. This is the filter length; The above formula Index in Replace with Then shift to the left Points, obtained: , Shared storage Each filter coefficient is used as the first storage table; A second storage table is established to store the old sampling times corresponding to the input data of the reconstruction filter; the method for establishing the second storage table is as follows: For each new sampling time, store the old sampling time corresponding to the input data of the reconstruction filter: In the formula, For indexing new sampling rate data, The value can be 1, 2, 3, 4... Integers; This represents the number of sampling points at the new sampling rate. This is the sampling rate conversion factor; These are parameters set manually based on computational requirements. This is the filter length; Shared storage The old sampling time is used as the second storage table; The real-time signal processing stage: For the input data stream at the old sampling rate, by period The signal is segmented; for each new sampling moment within the signal period, the corresponding reconstruction filter coefficients and the corresponding old sampling moment are read from the two storage tables, the input data under the old sampling rate is read, and the output data under the new sampling rate is calculated. Use two storage tables to perform the above processing on all segments.
2. The method for arbitrary multiple sampling rate conversion in a software radio system as described in claim 1, characterized in that... At: The method for calculating the output data under the new sampling rate is as follows: For each new sampling time Corresponding to the old sampling time Find in the input data at the old sampling rate Data, and Data from Beginning, to End; combine this data with Multiply and then sum to get ,Right now: 。 3. The method for arbitrary multiple sampling rate conversion in a software radio system as described in claim 1, characterized in that... At: It is more than 1000 times the symbol period.
4. The method for arbitrary multiple sampling rate conversion in a software radio system as described in claim 1, characterized in that... At: Greater than or equal to 3.
Citation Information
Patent Citations
Efficient Asynchronous Sample Rate Conversion
US20090319065A1
Methods or structures for reconstruction of substantially uniform samples from substantially nonuniform samples
WO2010124523A1