CN110708070A - Resampling method and device - Google Patents
Resampling method and device Download PDFInfo
- Publication number
- CN110708070A CN110708070A CN201910758123.4A CN201910758123A CN110708070A CN 110708070 A CN110708070 A CN 110708070A CN 201910758123 A CN201910758123 A CN 201910758123A CN 110708070 A CN110708070 A CN 110708070A
- Authority
- CN
- China
- Prior art keywords
- accumulation
- accumulator
- resampling
- input data
- ratio
- 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
Links
- 238000012952 Resampling Methods 0.000 title claims abstract description 57
- 238000000034 method Methods 0.000 title claims abstract description 26
- 238000005070 sampling Methods 0.000 claims abstract description 70
- 238000009825 accumulation Methods 0.000 claims abstract description 68
- 239000011159 matrix material Substances 0.000 claims description 18
- 238000010276 construction Methods 0.000 claims description 5
- 230000000694 effects Effects 0.000 abstract description 13
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000013139 quantization Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M1/00—Analogue/digital conversion; Digital/analogue conversion
- H03M1/12—Analogue/digital converters
- H03M1/124—Sampling or signal conditioning arrangements specially adapted for A/D converters
- H03M1/1245—Details of sampling arrangements or methods
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03M—CODING; DECODING; CODE CONVERSION IN GENERAL
- H03M1/00—Analogue/digital conversion; Digital/analogue conversion
- H03M1/06—Continuously compensating for, or preventing, undesired influence of physical parameters
- H03M1/0617—Continuously compensating for, or preventing, undesired influence of physical parameters characterised by the use of methods or means not specific to a particular type of detrimental influence
- H03M1/0626—Continuously compensating for, or preventing, undesired influence of physical parameters characterised by the use of methods or means not specific to a particular type of detrimental influence by filtering
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Complex Calculations (AREA)
Abstract
The invention discloses a resampling method and a resampling device, which can solve the technical problems that in the prior art, resampling can only provide interpolation resampling with integer multiplying power, the resampling effect is not accurate enough, and the effect is not good enough. The resampling method comprises the following steps: determining an interpolated sampling rate from a ratio of the target sampling frequency to the input sampling frequency; constructing an accumulator and performing a fixed increment accumulation, wherein the fixed increment of each accumulation of the accumulator is associated with the interpolated sampling ratio; and when the accumulation result of the accumulator is greater than a preset accumulation threshold value, carrying out interpolation operation on the input data once to finish resampling the input data.
Description
Technical Field
The invention belongs to the field of digital signal processing, and particularly relates to a resampling method and a resampling device.
Background
In a communication system, intermediate frequency bandpass sampling generally adopts a fixed rate clock to directly sample an input intermediate frequency signal, so that a clock for frequency conversion processing is irrelevant to a clock for receiving the signal. However, in baseband signal processing, the data stream based on the best sampling must be extracted. Therefore, a code stream clock adjustment and a corresponding resampling link are needed to be added between the frequency conversion part and the baseband processing part.
However, the resampling in the prior art can only provide interpolation resampling with integer multiplying power, and the resampling effect is not accurate enough and is not good enough.
Disclosure of Invention
In view of this, embodiments of the present invention provide a resampling method and apparatus, which can solve the technical problems in the prior art that resampling can only provide interpolation resampling with integer multiplying power, and the resampling effect is not accurate enough and the effect is not good enough.
In one aspect, the present invention provides a resampling method, including: determining an interpolated sampling rate from a ratio of the target sampling frequency to the input sampling frequency; constructing an accumulator and performing a fixed increment accumulation, wherein the fixed increment of each accumulation of the accumulator is associated with the interpolated sampling ratio; and when the accumulation result of the accumulator is greater than a preset accumulation threshold value, carrying out interpolation operation on the input data once to finish resampling the input data.
Optionally, the constructing an accumulator and performing fixed increment accumulation includes: and constructing the accumulator by taking the target sampling frequency as an accumulation frequency and taking the fixed increment as a step length and accumulating, wherein the fixed increment is equal to the ratio of a preset integer to the interpolation sampling ratio.
Optionally, the preset integer is a positive integer power of 2.
Optionally, when the accumulation result of the accumulator is greater than the preset accumulation threshold, performing an interpolation operation on the input data to complete resampling of the input data includes: when the accumulation result of the accumulator is greater than the preset accumulation threshold value, selecting a column of filter coefficients from a multi-phase filter coefficient matrix; and multiplying the filter coefficient by a delay line filter passed by the input data to finish resampling the input data.
Optionally, the column address of the filter coefficient selected from the polyphase filter coefficient matrix is obtained by multiplying the total column number of the polynomial filter coefficient matrix by the ratio of the accumulation result to the preset increment threshold, and then rounding down the product.
Optionally, the method further includes: and when the accumulation result of the accumulator is greater than a preset accumulation threshold value, closing the input gating of the input data and opening the input gating so as to perform interpolation resampling on the next group of input data.
In another aspect, the present invention further provides a resampling apparatus, including: a determination unit for determining an interpolation sampling rate according to a ratio of a target sampling frequency to an input sampling frequency; a construction and accumulation unit for constructing an accumulator and performing a fixed increment accumulation, wherein the fixed increment accumulated by the accumulator at each time is associated with the interpolated sampling ratio determined by the determination unit; and the interpolation unit is used for carrying out interpolation operation on the input data once to finish resampling of the input data when the accumulation result of the accumulator constructed by the construction and accumulation unit is greater than a preset accumulation threshold value.
Optionally, the constructing and accumulating unit is specifically configured to construct and accumulate the accumulator by using the target sampling frequency as an accumulation frequency and the fixed increment as a step length, where the fixed increment is equal to a ratio of a preset integer to the interpolation sampling ratio.
Optionally, the interpolation unit includes: the coefficient selection module is used for selecting a row of filter coefficients from the multi-phase filter coefficient matrix when the accumulation result of the accumulator is greater than the preset accumulation threshold value; and the multiplication module is used for multiplying the filter coefficient by the delay line filter passed by the input data so as to finish resampling of the input data.
Optionally, the column address of the filter coefficient selected by the coefficient selection module is a ratio of the total column number of the polynomial filter coefficient matrix multiplied by the accumulation result and the preset increment threshold, and the product is rounded down.
The resampling method and the resampling device provided by the embodiment of the invention can determine the interpolation sampling ratio according to the ratio of the target sampling frequency to the input sampling frequency, and perform interpolation sampling on the input data by combining the interpolation sampling ratio with the time of interpolation operation by using the accumulator, so that the interpolation resampling of any rational number multiplying power of the input sampling frequency is realized, the optimal sampling effect required by baseband processing signals is achieved, and the baseband data processing effect is effectively improved.
Drawings
FIG. 1 is a flow chart of a resampling method according to an embodiment of the invention;
FIG. 2 is a second flowchart of a resampling method according to an embodiment of the invention;
FIG. 3 is a schematic diagram of an implementation of an accumulator in the embodiment shown in FIG. 2;
fig. 4 is a schematic diagram of a resampling apparatus according to an embodiment of the present invention.
Detailed Description
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the contents of the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings and inventive contents can be obtained according to the contents of the embodiments of the present invention and the drawings in the specification without any creative effort.
In order to make the technical problems solved, technical solutions adopted and technical effects achieved by the present invention clearer, the technical solutions of the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings. The embodiments of the present invention are described below as examples to illustrate the technical solutions of the present invention, but the present invention is not limited thereto. It will be apparent to those skilled in the art that the resampling method proposed in the present invention can be widely applied to other similar or similar fields besides digital signal processing, and achieves similar technical effects.
The first embodiment is as follows:
fig. 1 is a flowchart of a resampling method provided in this embodiment. Referring to fig. 1, the resampling method provided in this embodiment may include:
s11, determining an interpolation sampling rate according to the ratio of the target sampling frequency to the input sampling frequency;
s12, constructing an accumulator and performing fixed increment accumulation, wherein the fixed increment accumulated by the accumulator at each time is related to the interpolation sampling rate;
and S13, when the accumulation result of the accumulator is larger than the preset accumulation threshold value, performing interpolation operation on the input data to complete resampling of the input data.
The resampling method provided by the embodiment of the invention can determine the interpolation sampling ratio according to the ratio of the target sampling frequency to the input sampling frequency, and the interpolation sampling ratio is combined with the time of interpolation operation by using the accumulator to perform interpolation sampling on the input data, so that the interpolation resampling of any rational number multiplying factor of the input sampling frequency is realized, the optimal sampling effect required by baseband processing signals is achieved, and the baseband data processing effect is effectively improved.
Specifically, in step S11, the input sampling frequency may be the sampling frequency of the received intermediate frequency signal, and the target sampling frequency may be determined according to the sampling requirements of the baseband signal processing on various input signals.
Optionally, in step S12, constructing an accumulator and performing fixed increment accumulation may include: and constructing the accumulator by taking the target sampling frequency as an accumulation frequency and taking the fixed increment as a step length and accumulating, wherein the fixed increment is equal to the ratio of a preset integer to the interpolation sampling ratio. For example, in one embodiment of the present invention, the predetermined integer is C and the interpolated sample rate isWherein f iss,outIs a target sampling frequency, fs,inFor input of sampling frequency, fixed incrementAlternatively, to make the resolution of the interpolation algorithm better, C may take a relatively large value, and is preferably a positive integer power of 2, to facilitate the calculation.
Specifically, in step S13, when the accumulation result of the accumulator is greater than the preset accumulation threshold, performing an interpolation operation on the input data to complete resampling of the input data includes:
when the accumulation result of the accumulator is greater than the preset accumulation threshold value, selecting a column of filter coefficients from a multi-phase filter coefficient matrix;
and multiplying the filter coefficient by a delay line filter passed by the input data to finish resampling the input data.
Example two
As a further example, as shown in fig. 2, the input data x (n) is output after passing through a series of delay line filters, and interpolation resampling can be realized by adjusting the filter coefficients of the delay line filters. Wherein the filter coefficients may be selected from a pre-stored matrix of polyphase filter coefficients. Optionally, in this embodiment, the size of the coefficient matrix of the polyphase filter is L × R, where L is the number of columns of the coefficient matrix of the polyphase filter, and R is the number of coefficients of each polyphase filter. Alternatively, in order to make the interpolation error smaller than the quantization error, the following condition should be satisfiedWhere L is the quantization error, B is the double sideband bandwidth of the low pass filter, and B is the number of bits per data. The column address of the filter coefficient selected from the polyphase filter coefficient matrix may be the total column number of the polynomial filter coefficient matrix multiplied by the ratio of the accumulation result to the preset increment threshold, and the product is rounded down, i.e. the product is rounded down
After the column address is obtained according to the above method, the column pointed by the column address can be selected from the filter coefficient array, and the column coefficient and the delay line filter are subjected to matrix multiplication. In this embodiment, each column has 6 filter coefficients, which are multiplied by exactly 6 filters in the delay line filter.
The process of accumulating by the accumulator and generating the corresponding coefficient column address may be as shown in fig. 3. As shown in fig. 3, with the targetThe sampling frequency is accumulation frequency, the accumulator is constructed and accumulated by taking the fixed increment as step length, and the accumulation result delta in the accumulatoraccumGreater than a predetermined accumulation threshold C (i.e., a predetermined integer (C) used in calculating the fixed increment, the input strobe of the input data is closed and enabled to interpolate the next set of input datas,outThe delay line filter sequence is updated when the NCO overflows, accumulating in increments of delta for frequency. Taking a polyphase filter coefficient matrixAnd multiplying and accumulating the column coefficients and the delay line filter sequence to obtain an output sequence y (m).
EXAMPLE III
On the basis of the foregoing embodiments, correspondingly, as shown in fig. 4, the present invention further provides a resampling apparatus, where a resampling apparatus in the present invention includes all the method contents of the methods according to the first embodiment and the second embodiment, and further elaborates, the resampling apparatus according to the present invention specifically includes:
a determination unit 41 for determining an interpolation sampling rate from a ratio of the target sampling frequency to the input sampling frequency;
a build and accumulate unit 42 for building an accumulator and performing a fixed increment accumulation, wherein the fixed increment accumulated by the accumulator at each time is associated with the interpolated sampling ratio determined by the determining unit;
and the interpolation unit 43 is configured to perform an interpolation operation on the input data once to complete resampling of the input data when an accumulation result of the accumulator constructed by the construction and accumulation unit is greater than a preset accumulation threshold.
In the resampling device provided in the embodiment of the present invention, the determining unit 41 can determine the interpolation sampling ratio according to the ratio of the required target sampling frequency to the input sampling frequency, and the constructing and accumulating unit 42 and the interpolating unit 43 can perform interpolation sampling on the input data by using the accumulator to combine the interpolation sampling ratio with the time of interpolation operation, so as to implement interpolation resampling with any rational number multiplying factor for the input sampling frequency, thereby achieving the optimal sampling effect required by baseband processing signals, and also effectively improving the baseband data processing effect.
Optionally, the constructing and accumulating unit 42 is specifically configured to construct and accumulate the accumulator by using the target sampling frequency as an accumulation frequency and using a fixed increment as a step length, where the fixed increment is equal to a ratio of a preset integer to the interpolated sampling ratio.
Optionally, the interpolation unit 43 may specifically include:
the coefficient selection module is used for selecting a row of filter coefficients from the multi-phase filter coefficient matrix when the accumulation result of the accumulator is greater than the preset accumulation threshold value;
and the multiplication module is used for multiplying the filter coefficient by the delay line filter passed by the input data so as to finish resampling of the input data.
Optionally, the column address of the filter coefficient selected by the coefficient selection module may be a product obtained by multiplying the total column number of the multiple filter coefficient matrices by a ratio of the accumulation result to the preset increment threshold, and then rounding down the product.
All or part of the technical solutions provided by the above embodiments may be implemented by software programming or dedicated hardware devices, where the software program is stored in a readable storage medium, for example: hard, optical, or floppy disks in computers; the dedicated hardware device may be an ASIC, FPGA, SoC, or IP Core with corresponding circuitry.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A resampling method, comprising:
step 1: determining an interpolated sampling rate from a ratio of the target sampling frequency to the input sampling frequency;
step 2: constructing an accumulator and performing a fixed increment accumulation, wherein the fixed increment of each accumulation of the accumulator is associated with the interpolated sampling ratio;
and step 3: and when the accumulation result of the accumulator is greater than a preset accumulation threshold value, carrying out interpolation operation on the input data once to finish resampling the input data.
2. The method of claim 1, wherein constructing an accumulator and performing a fixed delta accumulation comprises: and constructing the accumulator by taking the target sampling frequency as an accumulation frequency and taking the fixed increment as a step length and accumulating, wherein the fixed increment is equal to the ratio of a preset integer to the interpolation sampling ratio.
3. The method of claim 2, wherein the predetermined integer is a positive integer power of 2.
4. The method of claim 3, wherein performing an interpolation operation on the input data to complete the resampling of the input data when the accumulation result of the accumulator is greater than the preset accumulation threshold comprises: when the accumulation result of the accumulator is greater than the preset accumulation threshold value, selecting a column of filter coefficients from a multi-phase filter coefficient matrix; and multiplying the filter coefficient by a delay line filter passed by the input data to finish resampling the input data.
5. The method of claim 4, wherein the column address of the filter coefficients selected from the polyphase filter coefficient matrix is the total column number of the polynomial filter coefficient matrix multiplied by the ratio of the accumulation result to the predetermined increment threshold, the product then rounded down.
6. The method of claim 4, further comprising: and when the accumulation result of the accumulator is greater than a preset accumulation threshold value, closing the input gating of the input data and opening the input gating so as to perform interpolation resampling on the next group of input data.
7. A resampling apparatus using the method as recited in claim 1, comprising: a determination unit for determining an interpolation sampling rate according to a ratio of a target sampling frequency to an input sampling frequency; a construction and accumulation unit for constructing an accumulator and performing a fixed increment accumulation, wherein the fixed increment accumulated by the accumulator at each time is associated with the interpolated sampling ratio determined by the determination unit; and the interpolation unit is used for carrying out interpolation operation on the input data once to finish resampling of the input data when the accumulation result of the accumulator constructed by the construction and accumulation unit is greater than a preset accumulation threshold value.
8. The apparatus of claim 7, wherein the build and accumulate unit is further configured to build and accumulate the accumulator at the target sampling frequency and at the fixed increment, wherein the fixed increment is equal to a ratio of a predetermined integer to the interpolated sampling ratio.
9. The apparatus of claim 7, wherein the interpolation unit comprises: the coefficient selection module is used for selecting a row of filter coefficients from the multi-phase filter coefficient matrix when the accumulation result of the accumulator is greater than the preset accumulation threshold value; and the multiplication module is used for multiplying the filter coefficient by the delay line filter passed by the input data so as to finish resampling of the input data.
10. The apparatus of claim 9, wherein the column address of the filter coefficients selected by the coefficient selection module is the total column number of the plurality of filter coefficient matrices multiplied by the ratio of the accumulation result to the predetermined increment threshold, and the product is rounded down.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910758123.4A CN110708070A (en) | 2019-08-15 | 2019-08-15 | Resampling method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910758123.4A CN110708070A (en) | 2019-08-15 | 2019-08-15 | Resampling method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110708070A true CN110708070A (en) | 2020-01-17 |
Family
ID=69193356
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910758123.4A Pending CN110708070A (en) | 2019-08-15 | 2019-08-15 | Resampling method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110708070A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6584145B1 (en) * | 1999-06-02 | 2003-06-24 | Level One Communications, Inc. | Sample rate converter |
CN104077492A (en) * | 2014-07-08 | 2014-10-01 | 中国电子科技集团公司第四十一研究所 | Sample data interpolation method based on FPGA |
CN106301287A (en) * | 2016-08-20 | 2017-01-04 | 航天恒星科技有限公司 | A kind of method for resampling and device |
CN106972840A (en) * | 2017-02-28 | 2017-07-21 | 深圳市鼎阳科技有限公司 | A kind of sampling rate converting method and device |
CN106972832A (en) * | 2017-02-28 | 2017-07-21 | 深圳市鼎阳科技有限公司 | It is a kind of can any multiple resampling digital down converter |
-
2019
- 2019-08-15 CN CN201910758123.4A patent/CN110708070A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6584145B1 (en) * | 1999-06-02 | 2003-06-24 | Level One Communications, Inc. | Sample rate converter |
CN104077492A (en) * | 2014-07-08 | 2014-10-01 | 中国电子科技集团公司第四十一研究所 | Sample data interpolation method based on FPGA |
CN106301287A (en) * | 2016-08-20 | 2017-01-04 | 航天恒星科技有限公司 | A kind of method for resampling and device |
CN106972840A (en) * | 2017-02-28 | 2017-07-21 | 深圳市鼎阳科技有限公司 | A kind of sampling rate converting method and device |
CN106972832A (en) * | 2017-02-28 | 2017-07-21 | 深圳市鼎阳科技有限公司 | It is a kind of can any multiple resampling digital down converter |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4825398A (en) | Method and apparatus for converting an input scanning sequence into an output scanning sequence | |
US20070194960A1 (en) | Time-interleaved analog-to-digital converter having timing calibration | |
US5925093A (en) | Sampling frequency converting apparatus | |
CN109655644B (en) | Method and device for reducing random wave signal output jitter | |
CN105471433A (en) | Sample rate converter, an analog to digital converter and a method of converting a data stream | |
CN108918965A (en) | Multi channel signals phase, amplitude high-precision measuring method | |
CN109976660B (en) | Random signal sampling rate reconstruction method based on linear interpolation and data sampling system | |
EP2961089B1 (en) | Method and apparatus for estimating a maximum time interval error in a data transmission network | |
CN113630212B (en) | Downsampling method and downsampling device for digital signals | |
US20120033771A1 (en) | Multi-Channel Sample Rate Converter | |
CN106301287A (en) | A kind of method for resampling and device | |
US7813566B2 (en) | Data processing apparatus and data processing method | |
CN110708070A (en) | Resampling method and device | |
US8949303B2 (en) | Filter | |
CN106972840B (en) | Sampling rate conversion method and device | |
US7728743B2 (en) | Device and method for polyphase resampling | |
JPH09284094A (en) | Digital filter bank device and its operating method | |
CN108776259B (en) | Power analyzer based on digital bandwidth limiting technology | |
WO2006134688A1 (en) | Interpolation process circuit | |
CN103095249A (en) | Median filtering circuit and method thereof | |
US8249208B2 (en) | Method and device for downconverting the sampling frequency of a digital signal, for example in a non-integer frequency ratio | |
CN110231505B (en) | Oscilloscope waveform jitter correction method based on cubic spline interpolation | |
US6968353B2 (en) | Interpolator and interpolation method when interpolating a digital input signal sequence at interpolation instants prescribed by a control signal | |
JP2929807B2 (en) | Digital filter | |
EP2924879B1 (en) | Sampling rate conversion device |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200117 |