Random resampling method and system for digital signal

文档序号:1365692 发布日期:2020-08-11 浏览:26次 中文

阅读说明:本技术 一种数字信号的任意重采样方法及系统 (Random resampling method and system for digital signal ) 是由 田宣宣 梁强 万耿华 于 2020-04-03 设计创作,主要内容包括:本发明公开了一种数字信号的任意重采样方法及系统,属于信号采样技术领域。本发明的方法为先设定输入信号的采样率f<Sub>in</Sub>和输出信号的采样率f<Sub>out</Sub>,根据f<Sub>in</Sub>和f<Sub>out</Sub>计算获取初始化参数M和N;再根据初始化参数M和辛格函数计算重采样变换系数;之后写入并存储输入信号的数据,根据辛格函数的截断长度计算输入信号的抽样序列的起点和终点;再采用辛格函数并根据重采样变换系数、抽样序列的起点及终点计算得到输出信号的数据。本发明系统包括输入模块、输出模块、重采样模块以及系数模块,输入模块、输出模块、系数模块分别与重采样模块电连接。本发明的目的在于克服现有技术中,不能对任意数字信号进行重采样的不足,本发明可以实现对数字信号的任意重采样。(The invention discloses a method and a system for randomly resampling a digital signal, and belongs to the technical field of signal sampling. The method of the invention is that the sampling rate f of the input signal is firstly set in And the sampling rate f of the output signal out According to f in And f out Calculating and obtaining initialization parameters M and N; calculating a resampling transformation coefficient according to the initialization parameter M and the Singer function; then writing and storing the data of the input signal, and calculating the starting point and the end point of the sampling sequence of the input signal according to the truncation length of the sine function; and calculating to obtain data of the output signal by adopting a sine function according to the resampling transformation coefficient and the starting point and the ending point of the sampling sequence. The system comprises an input module, an output module, a resampling module and a coefficient module, wherein the input module, the output module and the coefficient module are respectively and electrically connected with the resampling module. The invention aims to overcome the defect that any digital signal cannot be repeated in the prior artDue to the insufficient sampling, the invention can realize random resampling of the digital signal.)

1. A method for arbitrary resampling of a digital signal, comprising

Setting the sampling rate f of an input signalinAnd the sampling rate f of the output signaloutAccording to finAnd foutCalculating and obtaining initialization parameters M and N; calculating a resampling transformation coefficient according to the initialization parameter M and the Singer function;

writing and storing data of the input signal;

calculating the starting point and the end point of a sampling sequence of the input signal according to the truncation length INF _ L of the sine function;

and calculating to obtain data of the output signal by adopting a sine function according to the resampling transformation coefficient and the starting point and the end point of the sampling sequence.

2. The method of claim 1, wherein the calculating the resampled transform coefficients comprises: firstly, carrying out M times of interpolation on the value in the truncation length of the sine function, and then quantizing the interpolated value to obtain a resampling transformation coefficient.

3. A method for arbitrary resampling of a digital signal as recited in claim 1, wherein the specific process of calculating the start and end points of the sample sequence of the input signal is: the method comprises the steps of firstly calculating a time starting point and a time ending point of a data sequence of an input signal according to the truncation length INF _ L of the sine function, and then calculating a starting point and an ending point of a sampling sequence of the input signal according to the time starting point, the time ending point and the truncation length INF _ L of the sine function.

4. A method of arbitrary resampling of a digital signal as claimed in claim 3, characterized in that the start and end of time of the data sequence of the input signal are calculated by the following equations:

setting n as data of an nth input signal, and m as data of an mth output signal;

time length T of data sequence of input signalboundComprises the following steps:

Tbound=INF_L/fin

time point T corresponding to data sequence of output signalmComprises the following steps:

Tm=m/fout

time start T of a data sequence of an input signalbeginAnd time end point TendComprises the following steps:

Tbegin=Tm-Tbound

Tend=Tm+Tbound

wherein f isinAnd foutHas a greatest common divisor of K, fout/fin=M/N,M=fout/K,N=fin/K。

5. A method of arbitrary resampling of a digital signal as claimed in claim 4, characterized in that the start seq _ begin and end seq _ end of the sample sequence of the input signal are calculated with the following equations:

6. the method of claim 5, wherein the step of computing the data of the output signal comprises:

firstly, reading the data of the input signal according to the starting point and the end point of the sampling sequence, reading the resampling transformation coefficient of the corresponding position, and then calculating the read data of the input signal and the transformation coefficient by using the sine function to obtain the output data.

7. A method of arbitrary resampling of a digital signal as claimed in claim 6, characterized in that the data of the output signal is calculated by the following formula:

where x (n) represents the data of the input signal and sinc represents the sine function.

8. A system employing the method of any resampling of a digital signal according to any of claims 1 to 7.

9. The system according to claim 8, comprising an input module, an output module, a resampling module and a coefficient module, wherein the input module, the output module and the coefficient module are electrically connected to the resampling module respectively, and the coefficient module is configured to store the resampling transform coefficients; the resampling module is used for calculating data of the output signal.

10. A system for arbitrary resampling of a digital signal as recited in claim 9, wherein the input module and the output module are RAMs and the coefficient module is ROM.

Technical Field

The present invention relates to the field of signal sampling technology, and more particularly, to a method and system for arbitrarily resampling a digital signal.

Background

The digital processing chip adopts a Harvard structure with separated programs and data, is provided with a special hardware multiplier, widely adopts pipeline operation, provides special DSP instructions, and can be used for quickly realizing various digital signal processing algorithms. With the development and application of digital processing chips, the intermediate frequency data processing also adopts a digital module to replace an analog processing module. In a receiver or a spectrometer, the clock sampling rate of the a/D conversion is generally fixed, and the required data rate is different for different communication systems, which requires a sample rate conversion, i.e. a resampling of the signal. Resampling refers to the process of interpolating information of one type of pixel from information of another type of pixel. In remote sensing, resampling is a process of extracting a low-resolution image from a high-resolution remote sensing image.

Commonly used resampling methods are nearest neighbor interpolation, bilinear interpolation and cubic convolution interpolation. The nearest neighbor method is to use the pixel value nearest to a certain pixel position in the image as the new value of the pixel. The bilinear interpolation method calculates the new value of the grid value by weighting the distance from the sampling point to the surrounding 4 neighborhood pixels. The cubic convolution interpolation method is a method with higher precision and larger operation amount, and achieves the optimal resampling effect by increasing the number of adjacent pixels participating in interpolation calculation.

Common digital-end data resampling methods include analog resampling and digital resampling. The analog resampling is to resample by DA and AD; digital resampling comprises integer-multiple decimation, integer-multiple interpolation, rational-factor data rate conversion. For the ratio of physicochemical factors, the numerator and the denominator are large, and resampling is difficult to realize by adopting cascade of integral multiple interpolation and interpolation; that is, in the prior art, the sampling rate conversion of the digital processing module is difficult to realize the resampling of any rational number data.

In summary, how to implement arbitrary resampling of a digital signal is a problem that needs to be solved urgently in the prior art.

Disclosure of Invention

1. Problems to be solved

The invention aims to overcome the defect that any digital signal cannot be resampled in the prior art, and provides a method and a system for resampling any digital signal, which can realize resampling any digital signal and reduce the distortion of resampled output data.

2. Technical scheme

In order to solve the problems, the technical scheme adopted by the invention is as follows:

the invention relates to a method for randomly resampling a digital signal, which comprises the step of setting the sampling rate f of an input signalinAnd the sampling rate f of the output signaloutAccording to finAnd foutCalculating and obtaining initialization parameters M and N; calculating a resampling transformation coefficient according to the initialization parameter M and the Singer function; then writing and storing the data of the input signal; calculating the starting point and the end point of a sampling sequence of the input signal according to the truncation length INF _ L of the sine function; and calculating to obtain data of the output signal by adopting a sine function according to the resampling transformation coefficient and the starting point and the ending point of the sampling sequence.

Further, the specific process of calculating the resampled transform coefficients is as follows: firstly, carrying out M times of interpolation on the value in the truncation length of the sine function, and then quantizing the interpolated value to obtain a resampling transformation coefficient.

Further, the specific process of calculating the start and end points of the sample sequence of the input signal is: the method comprises the steps of firstly calculating a time starting point and a time ending point of a data sequence of an input signal according to the truncation length INF _ L of the sine function, and then calculating a starting point and an ending point of a sampling sequence of the input signal according to the time starting point, the time ending point and the truncation length INF _ L of the sine function.

Further, the time start point and the time end point of the data sequence of the input signal are calculated using the following formulas:

setting n as data of an nth input signal, and m as data of an mth output signal;

time length T of data sequence of input signalboundComprises the following steps:

Tbound=INF_L/fin

time point T corresponding to data sequence of output signalmComprises the following steps:

Tm=m/fout

time start T of a data sequence of an input signalbeginAnd time end point TendComprises the following steps:

Tbegin=Tm-Tbound

Tend=Tm+Tbound

wherein f isinAnd foutHas a greatest common divisor of K, fout/fin=M/N,M=fout/K,N=fin/K。

Further, the start and end points seq _ begin and seq _ end of the sample sequence of the input signal are calculated using the following formulas:

further, the specific process of calculating the data of the output signal is as follows: firstly, reading the data of the input signal according to the starting point and the end point of the sampling sequence, reading the resampling transformation coefficient of the corresponding position, and then calculating the read data of the input signal and the transformation coefficient by using the sine function to obtain the output data.

Further, the data of the output signal is calculated using the following formula:

where x (n) represents the data of the input signal and sinc represents the sine function.

The invention also relates to a system adopting the random resampling method of the digital signal.

Furthermore, the device comprises an input module, an output module, a resampling module and a coefficient module, wherein the input module, the output module and the coefficient module are respectively electrically connected with the resampling module, and the coefficient module is used for storing the resampling transformation coefficient; the resampling module is used for calculating data of the output signal.

Furthermore, the input module and the output module are RAMs, and the coefficient module is a ROM.

3. Advantageous effects

Compared with the prior art, the invention has the beneficial effects that:

according to the random resampling method of the digital signal, the data of the input signal is intercepted by adopting the truncation length INF _ L of the sine function so as to calculate the data of the output signal, so that the data distortion degree of the reconstructed output signal is small, and random resampling of the digital signal can be realized; furthermore, the ratio of the sampling rate of the input signal to the sampling rate of the output signal is equal to the ratio of the sampling rate of the input signal to the sampling rate of the output signal, so that the sampling rate can be changed by changing the values of the sampling rates of the input signal and the output signal and further changing the values of the initialization parameters M and N, and further, the digital signal can be re-sampled randomly. The system of the invention has simple structure, can be realized on FPGA, and can realize random resampling of digital signals by using less hardware resources.

Drawings

FIG. 1 is a schematic flow diagram of the process of the present invention;

FIG. 2 is a schematic diagram of the system of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments; moreover, the embodiments are not relatively independent, and can be combined with each other according to needs, so that a better effect is achieved. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. 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.

For a further understanding of the invention, reference should be made to the following detailed description taken in conjunction with the accompanying drawings and examples.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:低频大功率高压信号发生装置及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类