CN110704792A - Method for realizing real-time and efficient sampling rate arbitrary transformation - Google Patents

Method for realizing real-time and efficient sampling rate arbitrary transformation Download PDF

Info

Publication number
CN110704792A
CN110704792A CN201910930738.0A CN201910930738A CN110704792A CN 110704792 A CN110704792 A CN 110704792A CN 201910930738 A CN201910930738 A CN 201910930738A CN 110704792 A CN110704792 A CN 110704792A
Authority
CN
China
Prior art keywords
sampling rate
sampling
point
output
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910930738.0A
Other languages
Chinese (zh)
Inventor
张海拓
方健贵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Haige Communication Group Inc Co
Original Assignee
Guangzhou Haige Communication Group Inc Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Haige Communication Group Inc Co filed Critical Guangzhou Haige Communication Group Inc Co
Priority to CN201910930738.0A priority Critical patent/CN110704792A/en
Publication of CN110704792A publication Critical patent/CN110704792A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Complex Calculations (AREA)

Abstract

The invention discloses a real-time and efficient method for realizing random conversion of sampling rate, which comprises the following steps: caching data with a sampling rate of Fi, wherein the data of M sampling points need to be cached, and M is more than or equal to 4; calculating the stepping interval of an output sampling sequence according to the sampling rate Fo required to be output, and calculating the coordinates of a time point required to be interpolated, and recording the coordinates as x; according to the cached data and the coordinate x of the interpolation point, performing M-point (M-1) Lagrange interpolation calculation to obtain a sampling output result f (x) at the moment; and repeating the steps to obtain data output with the sampling rate Fo, thereby realizing the random conversion of the sampling rate. The invention adopts a polynomial interpolation method based on four-point cubic Lagrange interpolation, and for fractional frequency conversion with the conversion ratio of M/N, the algorithm implementation process and complexity are irrelevant to M and N values, and the achievable sampling rate conversion ratio has no limit to the M and N values.

Description

Method for realizing real-time and efficient sampling rate arbitrary transformation
Technical Field
The invention relates to the field of sampling data output, in particular to a real-time high-efficiency method for realizing arbitrary conversion of a sampling rate.
Background
In modern communication systems, digital information transmission is an important application requirement, the sampling rate of digital signals is the basic characteristic of data, and different devices have different requirements on the sampling rate, such as the sampling rate of audio signals with 8kHz, 9.6kHz, 11.025kHz, 19.2kHz, 32kHz, 38.4kHz, and the like. In order to meet the signal processing requirements of the post-stage equipment, the pre-stage equipment is required to be capable of outputting digital signals with different sampling rates. Generally, a signal processing part adopts a fixed sampling rate design, a sampling rate conversion module is inserted into an output stage to realize a sampling rate conversion function, and how to realize the sampling rate conversion in real time, high efficiency and no distortion is the key point of product design.
In the prior art, for sampling rate conversion, an interpolation or extraction method may be adopted, where interpolation realizes up-conversion of integer times, extraction realizes down-conversion of integer times, and digital filtering is required to avoid aliasing of frequency domain, and the specific process is as shown in fig. 1. As can be seen from FIG. 1, the original data sampling rate is F, the M times interpolation output material rate is M × F, and the N times extraction output sampling rate is F/N, and fractional times sampling rate conversion with the conversion ratio of M/N can be realized by a method of combining interpolation and extraction.
The existing sampling rate conversion technology based on extraction and interpolation can theoretically realize any fractional sampling rate conversion, but the following problems exist in the realization process:
1. when M and N are large, the implementation algorithm overhead is large, a large number of multipliers and memory resources are needed, and the implementation is difficult. For example, in the case of original audio data with a sampling rate of 32kHz, in order to realize audio output with a sampling rate of 11.025kHz, a transform ratio of 11.025k/32k is 441/1280, which requires 441 times interpolation and 1280 times decimation, and thus, the implementation is difficult due to such a large number of transforms.
2. And the sampling rate can not be arbitrarily changed. Generally, the sampling rate is arbitrarily changed, namely the sampling rate is within a certain range, and the sampling rate can be arbitrarily changed at a certain frequency interval. For example, the sampling rate is in the range of 8kHz to 32kHz, and the sampling rate can be set randomly by 1Hz stepping. Since the sampling rate conversion method based on decimation and interpolation has limitations on M and N, many conversion ratios are difficult to implement, and the sampling rate cannot be set arbitrarily.
Disclosure of Invention
The invention mainly aims to overcome the defects of the prior art and provide a real-time and efficient method for realizing random conversion of the sampling rate.
The purpose of the invention is realized by the following technical scheme:
a real-time and efficient implementation method for sampling rate arbitrary transformation comprises the following steps:
s1, caching data with Fi sampling rate, caching data of M sampling points, and setting the time coordinate of each sampling point as x0,x1,x2,……,xM-1(ii) a The corresponding sampled data value is f (x)0),f(x1),f(x2),……,f(xM-1) (ii) a Wherein M is more than or equal to 4;
s2, calculating the step interval of the output sampling sequence according to the sampling rate Fo required to be output, and calculating the coordinate of the time point required to be interpolated, and recording the coordinate as x;
s3, performing M-point (M-1) Lagrange interpolation calculation according to the cached data and the interpolation point coordinate x to obtain a sampling output result f (x) at the moment;
and repeating the steps to obtain data output with the sampling rate Fo, thereby realizing the random conversion of the sampling rate.
In the method for realizing the real-time and efficient arbitrary sampling rate conversion, M is 4; the method is realized by adopting a four-point cubic Lagrange interpolation method to carry out sampling rate conversion, and specifically comprises the following steps:
(1) caching data with a sampling rate of Fi, wherein the data of 4 sampling points needs to be cached, and the time coordinate of each sampling point is set as x0,x1,x2,x3(ii) a The corresponding sampled data value is f (x)0),f(x1),f(x2),f(x3);
(2) Calculating the stepping interval of an output sampling sequence according to the sampling rate Fo required to be output, and calculating the coordinates of a time point required to be interpolated, and recording the coordinates as x;
(3) performing four-point three-time Lagrange interpolation calculation according to the cached data and the interpolation point coordinate x to obtain a sampling output result f (x) at the moment; wherein
Figure BDA0002220201740000031
And repeating the steps to obtain data output with the sampling rate Fo, thereby realizing the random conversion of the sampling rate.
The M value selection is mainly based on the consideration of interpolation effect and operand, and the operand needs to be reduced as little as possible on the premise of ensuring the effect, so that the real-time performance of transformation is ensured.
If the value of M is too small, the interpolation effect is not satisfactory. And M is 2 linear interpolation, M is 3 quadratic interpolation, the interpolation curve is not smooth, and the spurious suppression is poor, so that the signal distortion is caused.
If the value of M is too large, the amount of computation increases rapidly, and particularly, a large number of multiplication and division operations are involved, which consumes a large amount of computation resources and is not favorable for the real-time performance of signal processing.
In the high-order interpolation with M >4, although the spurious suppression is not improved significantly as compared with the cubic interpolation with M of 4, the interpolation is performed with M of 4 because the amount of computation is much larger than that of M of 4.
Compared with the prior art, the invention has the following advantages and beneficial effects:
1. the invention adopts a polynomial interpolation method based on four-point cubic Lagrange interpolation, and for fractional frequency conversion with the conversion ratio of M/N, the algorithm implementation process and complexity are irrelevant to M and N values, and the achievable sampling rate conversion ratio has no limit to the M and N values;
2. the sampling rate conversion method can realize the conversion of any sampling rate in a certain frequency range;
3. compared with the traditional sampling rate conversion method, the algorithm is simple to realize, can improve the processing speed in the hardware realization process, and saves the consumption of logic and multiplication operation resources.
Drawings
Fig. 1 is a flow chart of a prior art method for implementing sampling rate conversion by interpolation or decimation.
Fig. 2 is a flow chart of a method for implementing real-time and efficient sampling rate arbitrary transformation according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited thereto.
As shown in fig. 2, a method for implementing real-time and efficient sampling rate arbitrary transformation is implemented by using a four-point and three-times lagrangian interpolation method to perform sampling rate transformation, and specifically includes:
(1) caching data with a sampling rate of Fi, wherein the data of 4 sampling points needs to be cached, and the time coordinate of each sampling point is set as x0,x1,x2,x3(ii) a The corresponding sampled data value is f (x)0),f(x1),f(x2),f(x3);
(2) Calculating the stepping interval of an output sampling sequence according to the sampling rate Fo required to be output, and calculating the coordinates of a time point required to be interpolated, and recording the coordinates as x;
(3) performing four-point three-time Lagrange interpolation calculation according to the cached data and the interpolation point coordinate x to obtain a sampling output result f (x) at the moment; wherein
Figure BDA0002220201740000041
Figure BDA0002220201740000051
And repeating the steps to obtain data output with the sampling rate Fo, thereby realizing the random conversion of the sampling rate.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.

Claims (2)

1. A real-time and efficient method for realizing arbitrary conversion of sampling rate is characterized by comprising the following steps:
s1, caching data with Fi sampling rate, caching data of M sampling points, and setting the time coordinate of each sampling point as x0,x1,x2,……,xM-1(ii) a The corresponding sampled data value is f (x)0),f(x1),f(x2),……,f(xM-1) (ii) a Wherein M is more than or equal to 4;
s2, calculating the step interval of the output sampling sequence according to the sampling rate Fo required to be output, and calculating the coordinate of the time point required to be interpolated, and recording the coordinate as x;
s3, performing M-point (M-1) Lagrange interpolation calculation according to the cached data and the interpolation point coordinate x to obtain a sampling output result f (x) at the moment;
and repeating the steps to obtain data output with the sampling rate Fo, thereby realizing the random conversion of the sampling rate.
2. The method of claim 1, wherein M is 4; the method is realized by adopting a four-point cubic Lagrange interpolation method to carry out sampling rate conversion, and specifically comprises the following steps:
(1) caching data with a sampling rate of Fi, wherein the data of 4 sampling points needs to be cached, and the time coordinate of each sampling point is set as x0,x1,x2,x3(ii) a The corresponding sampled data value is f (x)0),f(x1),f(x2),f(x3);
(2) Calculating the stepping interval of an output sampling sequence according to the sampling rate Fo required to be output, and calculating the coordinates of a time point required to be interpolated, and recording the coordinates as x;
(3) performing four-point three-time Lagrange interpolation calculation according to the cached data and the interpolation point coordinate x to obtain a sampling output result f (x) at the moment; wherein
And repeating the steps to obtain data output with the sampling rate Fo, thereby realizing the random conversion of the sampling rate.
CN201910930738.0A 2019-09-29 2019-09-29 Method for realizing real-time and efficient sampling rate arbitrary transformation Pending CN110704792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910930738.0A CN110704792A (en) 2019-09-29 2019-09-29 Method for realizing real-time and efficient sampling rate arbitrary transformation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910930738.0A CN110704792A (en) 2019-09-29 2019-09-29 Method for realizing real-time and efficient sampling rate arbitrary transformation

Publications (1)

Publication Number Publication Date
CN110704792A true CN110704792A (en) 2020-01-17

Family

ID=69197294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910930738.0A Pending CN110704792A (en) 2019-09-29 2019-09-29 Method for realizing real-time and efficient sampling rate arbitrary transformation

Country Status (1)

Country Link
CN (1) CN110704792A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004173183A (en) * 2002-11-22 2004-06-17 Toa Corp Transformation device for lagrange interpolation sampling rate
WO2006077795A1 (en) * 2005-01-21 2006-07-27 Pioneer Corporation Sampling frequency converting apparatus
CN101262240A (en) * 2008-04-25 2008-09-10 浙江大学 An easy-to-realize method and device for full digital frequency conversion
CN109271133A (en) * 2018-08-01 2019-01-25 南京中感微电子有限公司 A kind of data processing method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004173183A (en) * 2002-11-22 2004-06-17 Toa Corp Transformation device for lagrange interpolation sampling rate
WO2006077795A1 (en) * 2005-01-21 2006-07-27 Pioneer Corporation Sampling frequency converting apparatus
CN101262240A (en) * 2008-04-25 2008-09-10 浙江大学 An easy-to-realize method and device for full digital frequency conversion
CN109271133A (en) * 2018-08-01 2019-01-25 南京中感微电子有限公司 A kind of data processing method and system

Similar Documents

Publication Publication Date Title
Goldberg et al. New high accuracy pulse width modulation based digital-to-analogue convertor/power amplifier
US5907295A (en) Audio sample-rate conversion using a linear-interpolation stage with a multi-tap low-pass filter requiring reduced coefficient storage
US10367477B2 (en) Sparse cascaded-integrator-comb filters
CN100502378C (en) Circuit and method of peak-to-average ratio suppression in OFDM system
CN101282322A (en) Built-in digital filter apparatus for physical layer of wireless intermediate-range sensing network
CN109525256B (en) Channelized transmitting structure of narrow-transition-band filter bank based on FPGA
CN114124034A (en) High-speed parallel interpolation filter design based on FPGA
US20150127333A1 (en) Efficient digital microphone receiver process and system
CN110704792A (en) Method for realizing real-time and efficient sampling rate arbitrary transformation
US5821884A (en) Sampling rate conversion method and apparatus utilizing an area effect correlation method
CA2977865C (en) Data processor, data processing method and communication device
Schwingshackl et al. Polyphase representation of multirate nonlinear filters and its applications
CN114389626A (en) High-speed digital signal channel demodulation system
CN108270416B (en) High-order interpolation filter and method
CN113037430B (en) Sampling rate conversion method, device, equipment and storage medium
Patki et al. Low complexity, low latency resampling of asynchronously sampled signals
Mehra et al. Reconfigurable Area and Speed Efficient Interpolator Using DALUT Algorithm
Rajagopal Power and area efficient decimation filter architectures of wireless receivers
Vandamme On the synthesis of digital transmit filters
Abeysekera et al. Design of optimal and narrow-band Laguerre filters for sigma-delta demodulators
US6421697B1 (en) Variants on low-latency convolution-smooth updating of filter response using crossfades
Abed et al. High speed digital filter design using minimal signed digit representation
CN113872566B (en) Modulation filtering device and method with continuously adjustable bandwidth
Zhang et al. Digital Modulation and FPGA Implementation of MSK Based on SDR
Mehra et al. FPGA based Speed Efficient Decimator using Distributed Arithmetic Algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200117