CN111490752A - A Method for Obtaining Spectral Derivatives of Digital Filters - Google Patents

A Method for Obtaining Spectral Derivatives of Digital Filters Download PDF

Info

Publication number
CN111490752A
CN111490752A CN202010323253.8A CN202010323253A CN111490752A CN 111490752 A CN111490752 A CN 111490752A CN 202010323253 A CN202010323253 A CN 202010323253A CN 111490752 A CN111490752 A CN 111490752A
Authority
CN
China
Prior art keywords
derivative
transfer function
convolution
result
array
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.)
Granted
Application number
CN202010323253.8A
Other languages
Chinese (zh)
Other versions
CN111490752B (en
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.)
Guangxi University of Science and Technology
Original Assignee
Guangxi University of Science and Technology
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 Guangxi University of Science and Technology filed Critical Guangxi University of Science and Technology
Priority to CN202010323253.8A priority Critical patent/CN111490752B/en
Publication of CN111490752A publication Critical patent/CN111490752A/en
Application granted granted Critical
Publication of CN111490752B publication Critical patent/CN111490752B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H17/00Networks using digital techniques
    • H03H17/02Frequency selective networks
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry

Landscapes

  • Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Spectrometry And Color Measurement (AREA)
  • Complex Calculations (AREA)

Abstract

本发明提供一种用于数字滤波器求取光谱导数的方法,包括步骤1,选取待求导光谱Sp;步骤2,构造卷积传递函数H;步骤3,求取光谱Sp的导数;卷积传递函数H通过以下步骤得到的:设计平滑滤波器的传递函数PF,对PF进行傅里叶逆变换得到数组H0,由数组H0得到卷积传递函数H;所述求取光谱Sp的导数包括直接计算H与光谱数据Sp卷积,经过选择性切除后得到的0阶结果;和用H差分替代求导,获得各阶差分结果,计算其与Sp的卷积,经过选择性切除后得到Sp的n阶导数结果。本发明可计算出容易清楚辨识的各阶导数谱;使用本发明方法得到的导数谱图,可获得更为清晰、确定的信息,对于谱图的识别、辨识和深入解析,具有重要意义。

Figure 202010323253

The present invention provides a method for obtaining a spectral derivative for a digital filter, comprising: step 1, selecting a spectrum Sp to be derived; step 2, constructing a convolution transfer function H; step 3, obtaining the derivative of the spectrum Sp; convolution The transfer function H is obtained through the following steps: designing the transfer function PF of the smoothing filter, performing inverse Fourier transform on the PF to obtain an array H0, and obtaining the convolution transfer function H from the array H0; Calculate the convolution of H and the spectral data Sp, and obtain the 0th-order result after selective excision; and use the H difference to replace the derivation to obtain the results of each order difference, calculate its convolution with Sp, and obtain the Sp after selective excision. The nth derivative result. The invention can calculate the derivative spectrum of each order which is easy to be clearly identified; the derivative spectrum obtained by the method of the invention can obtain clearer and definite information, which is of great significance for the identification, identification and in-depth analysis of the spectrum.

Figure 202010323253

Description

一种用于数字滤波器求取光谱导数的方法A Method for Obtaining Spectral Derivatives of Digital Filters

技术领域technical field

本发明涉及领域,尤其涉及一种用于数字滤波器求取光谱导数的方法。The present invention relates to the field, in particular to a method for obtaining spectral derivatives of a digital filter.

背景技术Background technique

导数光谱法在紫外-可见光谱分析中已经是一种成熟有效的方法,因为其可有效提高光谱的分辨能力,提高选择性,对解决复杂多组分体系的直接测量问题起到了重要作用。同时,对于近红外光谱,通过求取一阶导消除散射漂移,也是一种常规的数据预处理方法。但对于其他光谱,尤其是峰型尖锐而狭窄的拉曼和红外光谱,应用并不多,究其原因并非方法不适用,而是缺乏有效的导数光谱获取手段;对于紫外-可见光谱、近红外光谱,导数光谱法由于求导能力限制,基本上采用1阶处理,止步于2阶,2阶及其以上的导数光谱实现难度较大。Derivative spectroscopy has been a mature and effective method in UV-Vis spectral analysis, because it can effectively improve the spectral resolution and selectivity, and play an important role in solving the direct measurement problem of complex multi-component systems. At the same time, for near-infrared spectroscopy, it is also a conventional data preprocessing method to eliminate the scattering drift by obtaining the first derivative. However, for other spectra, especially Raman and infrared spectra with sharp and narrow peaks, there are not many applications. The reason is not that the method is not suitable, but the lack of effective means of obtaining derivative spectra; Due to the limitation of the derivation ability, the spectrum and derivative spectroscopy basically adopts the first-order processing, and stops at the second-order, and it is difficult to realize the derivative spectrum of the second-order and above.

光谱求导的难度在于噪声干扰,对于不同频率的信号,其幅度随频率呈指数衰减。直接的求导,除非非常高信噪比,否则信号中噪声高频部分经过导数处理会完全覆盖真实信号。因此,必须采用有效的导数降噪方法,滤除信号的高频部分,保留相对低频的真实信号。导数光谱法得以在紫外或者近红外光谱的宽峰上实现的原因在于,被降噪的真实信号频率越低,与噪声高频差异越大,导数计算的难度越小。而在拉曼、中红外这样的窄峰上,频率与噪声的高频相近,问题难度显著提升。The difficulty of spectral derivation lies in noise interference. For signals of different frequencies, its amplitude decays exponentially with frequency. Direct derivation, unless the signal-to-noise ratio is very high, the high-frequency part of the noise in the signal will completely cover the real signal after derivative processing. Therefore, an effective derivative noise reduction method must be adopted to filter out the high-frequency part of the signal and retain the relatively low-frequency real signal. The reason why derivative spectroscopy can be implemented on the broad peaks of the ultraviolet or near-infrared spectrum is that the lower the frequency of the real signal being denoised, the greater the difference from the high frequency of the noise, and the less difficult it is to calculate the derivative. On the narrow peaks such as Raman and mid-infrared, the frequency is close to the high frequency of the noise, and the difficulty of the problem is significantly improved.

光谱求导方法有软硬件两种解决方案,通过电子差分元件的硬件方法,除了设备和设计成本增加外,效果也有限,更多时候还是依靠信号处理算法的软件实现。算法途径上,目前较为可行的S-G数字微分滤波器,但要实现更好的效果,还是受限于信号的信噪比。S-G算法的精度有限,参数设定跳跃度大,无法微调,因此二阶导数计算误差显著增大,而且随着滤波强度增加,其峰型出现明显误差。The spectral derivation method has two solutions: software and hardware. Through the hardware method of electronic differential components, in addition to the increase in equipment and design costs, the effect is also limited, and more often it relies on software implementation of signal processing algorithms. In terms of the algorithm approach, the S-G digital differential filter is relatively feasible at present, but to achieve better results, it is still limited by the signal-to-noise ratio of the signal. The accuracy of the S-G algorithm is limited, and the parameter setting jump degree is large, which cannot be fine-tuned. Therefore, the calculation error of the second derivative increases significantly, and with the increase of the filtering strength, the peak shape has obvious errors.

现有的S-G滤波器对光谱数据具有较好的直接平滑表现,但是随着求导阶数上升,其精度设置限制,导致误差无法微调,2阶以上的导数计算误差明显。由于滤波降噪-求导方法具有可靠的数学原理,因而,想要降低计算误差的关键是提高方法的可调节精度。The existing S-G filter has a good direct smoothing performance for spectral data, but as the derivative order increases, its precision setting is limited, resulting in the inability to fine-tune the error, and the calculation error of the derivative above the second order is obvious. Since the filtering noise reduction-derivation method has a reliable mathematical principle, the key to reducing the calculation error is to improve the adjustable accuracy of the method.

以S-G滤波为代表的多项式拟合-最小二乘优化滤波,原理上归结为简化的FIR滤波器。而多项式拟合途径遇到的直接问题是,采用高阶多项式拟合后,导致的龙格现象;精度越高,需要的多项式阶数也越高,发生龙格现象的可能就越大。因此,可选阶数有限,可调范围通常为2-8阶整数,可选参数的范围很小;另外,S-G滤波器框架宽度有限,且只能为奇数,步进幅度最小为2,无法进一步微调细分。The polynomial fitting represented by the S-G filter - the least squares optimization filter, in principle boils down to a simplified FIR filter. The direct problem encountered by the polynomial fitting approach is the Runge phenomenon caused by the use of high-order polynomial fitting; the higher the accuracy, the higher the polynomial order required, and the greater the possibility of Runge phenomenon. Therefore, the optional order is limited, the adjustable range is usually 2-8 order integers, and the range of optional parameters is very small; in addition, the frame width of the S-G filter is limited, and it can only be an odd number, and the minimum step width is 2, which cannot be Further fine-tuning the segmentation.

高精度的高阶导数测量或计算,在国际高端仪器设计和制造中是一项关键技术,缺乏有效算法,就不得不依赖非常高信噪比的仪器硬件,推升产品造价。高精度数字滤波求导算法在仪器研发和产品性能上,其技术和产业的价值都非常高。High-precision high-order derivative measurement or calculation is a key technology in the design and manufacture of international high-end instruments. Without effective algorithms, it has to rely on instrument hardware with a very high signal-to-noise ratio, pushing up product costs. The high-precision digital filter derivation algorithm has very high technical and industrial value in instrument R&D and product performance.

发明人发现,数字滤波器的计算原理是原始信号与传递函数的卷积计算,要提高滤波器的可调能力,可以改进传递函数的精度来实现。进一步的,根据卷积性质,原始信号的导数计算可以通过原始信号与传递函数导数的卷积实现。The inventor found that the calculation principle of the digital filter is the convolution calculation of the original signal and the transfer function. To improve the adjustable ability of the filter, the accuracy of the transfer function can be improved. Further, according to the property of convolution, the calculation of the derivative of the original signal can be realized by convolution of the original signal and the derivative of the transfer function.

发明内容SUMMARY OF THE INVENTION

为了解决上述相关领域中的不足,本发明提供一种用于数字滤波器求取光谱导数的方法。In order to solve the above deficiencies in the related art, the present invention provides a method for obtaining a spectral derivative of a digital filter.

发明的一种用于数字滤波器求取光谱导数的方法是通过以下技术方案实现的:A method for obtaining the spectral derivative of a digital filter invented by the invention is realized by the following technical solutions:

一种用于数字滤波器求取光谱导数的方法,其特征在于,包括:A method for obtaining a spectral derivative for a digital filter, comprising:

步骤1,选取待进行求导的光谱Sp;Step 1, select the spectrum Sp to be differentiated;

步骤2,构造用于求导计算的卷积传递函数H;Step 2, constructing the convolution transfer function H for derivation calculation;

步骤3,通过所述卷积传递函数H,求取光谱Sp的导数。Step 3, through the convolution transfer function H, the derivative of the spectrum Sp is obtained.

进一步地,步骤2所述卷积传递函数H是通过以下步骤得到的:Further, the convolution transfer function H described in step 2 is obtained through the following steps:

步骤a,设计平滑滤波器的传递函数PF;Step a, design the transfer function PF of the smoothing filter;

步骤b,对所述传递函数PF进行傅里叶逆变换,输出变换数组的实部数组,得到数组H0;Step b, inverse Fourier transform is performed on the transfer function PF, and the real part array of the output transform array is obtained to obtain the array H0;

步骤c,根据步骤b得到的数组H0得到卷积传递函数H。In step c, the convolution transfer function H is obtained according to the array H0 obtained in step b.

进一步地,步骤3所述求取光谱Sp的导数包括求取Sp的0阶结果和求取Sp的n阶结果;其中,n为正整数。Further, obtaining the derivative of the spectrum Sp described in step 3 includes obtaining the 0-order result of Sp and obtaining the n-order result of Sp; wherein, n is a positive integer.

进一步地,所述求取Sp的0阶结果是通过以下方法得到的:Further, the 0th-order result of obtaining Sp is obtained by the following method:

直接计算H与被滤波的光谱数据Sp卷积;directly compute the convolution of H with the filtered spectral data Sp;

如果H中含有m个元素,从卷积结果的前后切除各m/2个元素,剩下的数组元素即对应了Sp平滑的结果,也就是0阶结果;If there are m elements in H, m/2 elements are removed from the front and rear of the convolution result, and the remaining array elements correspond to the result of Sp smoothing, that is, the 0-order result;

其中,m为非负整数。where m is a non-negative integer.

进一步地,所述求取Sp的n阶结果是通过以下方法得到的:Further, the nth-order result of obtaining Sp is obtained by the following method:

用H差分替代求导,可以顺序获得H(1),H(2),……,H(n)等各阶差分结果,计算H的各阶差分H(n)与Sp的卷积;Using H difference instead of derivation, you can obtain H(1), H(2), ..., H(n) and other order difference results in sequence, and calculate the convolution of H(n) and Sp of each order difference of H;

如果H(n)的元素个数m为偶数,从卷积结果的前后各切除m/2个,留下的元素即为Sp的n阶导数结果;If the number of elements m of H(n) is an even number, m/2 elements are removed from the front and rear of the convolution result, and the remaining elements are the result of the n-order derivative of Sp;

如果H(n)的元素个数m为奇数,从卷积结果的前后各切除(m+1)/2个,后端切除(m-1)/2个元素,留下的元素即为Sp的n阶导数结果。If the number of elements m of H(n) is an odd number, (m+1)/2 elements are removed from the front and rear of the convolution result, and (m-1)/2 elements are removed from the back end, and the remaining element is Sp The result of the nth derivative of .

进一步地,步骤a所述传递函数PF表现为一个数组,所述传递函数PF包括带阻段Wr和带通段Wp;Further, the transfer function PF described in step a is represented as an array, and the transfer function PF includes a band-stop segment Wr and a band-pass segment Wp;

所述带阻段Wr选择用于描述信号带通行为的分布函数的右半部,用于设定可通过的频率百分比,所述通过的频率范围包括低频信号;The band-stop section Wr is selected to describe the right half of the distribution function of the band-pass behavior of the signal, and is used to set the percentage of frequencies that can be passed, and the passed frequency range includes low-frequency signals;

所述带通段Wp用于许可频率100%通过;The bandpass section Wp is used to allow 100% of the frequency to pass;

其中,Wr和Wp为非负整数,数越小,滤波强度越大。Among them, Wr and Wp are non-negative integers, and the smaller the number, the greater the filtering strength.

进一步地,步骤b所述数组H0是指自输出实部数组的头部至整个数组的一半位置的数组。Further, the array H0 described in step b refers to the array from the head of the output real part array to the half position of the whole array.

进一步地,步骤c所述卷积传递函数H是通过将H0与H0前后翻转得到的H1合并,并除以所有元素的总和值得到的;Further, the convolution transfer function H described in step c is obtained by merging H1 obtained by flipping H0 and H0 before and after, and dividing by the sum value of all elements;

所述卷积传递函数H的公式为:The formula of the convolution transfer function H is:

H=[H1,H0]/sum([H1,H0])。H=[H1, H0]/sum([H1, H0]).

进一步地,所述传递函数PF的公式如下:Further, the formula of the transfer function PF is as follows:

Figure BDA0002462236900000051
Figure BDA0002462236900000051

本发明的求导方法相比与现有技术而言,具有以下优点:Compared with the prior art, the derivation method of the present invention has the following advantages:

1)依次求取传递函数的各阶导数(差分),然后求取原始信号与传递函数各阶导数(差分)的卷积,实现了获取多阶导数光谱;1) Obtain the derivative (difference) of each order of the transfer function in turn, and then obtain the convolution of the original signal and the derivative (difference) of each order of the transfer function, and realize the acquisition of the multi-order derivative spectrum;

2)本发明可计算出容易清楚辨识的各阶导数谱;2) The present invention can calculate the derivative spectrum of each order that is easy and clearly identified;

3)使用本发明方法得到的导数谱图,可以获得更为清晰、确定的信息;3) Using the derivative spectrum obtained by the method of the present invention, clearer and definite information can be obtained;

4)本发明的方法对于谱图的识别、辨识和深入解析,具有重要意义。4) The method of the present invention is of great significance for the identification, identification and in-depth analysis of the spectrum.

附图说明Description of drawings

附图用来提供对本发明的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明,并不构成对本发明的限制。The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification, and are used to explain the present invention together with the embodiments of the present invention, and do not constitute a limitation to the present invention.

图1为本发明实施例1中模拟频率阻通幅度函数PF;Fig. 1 is the analog frequency blocking amplitude function PF in the embodiment 1 of the present invention;

图2为本发明实施例1中频率阻通幅度函数PF经逆傅里叶变换后的实部输出示意图;2 is a schematic diagram of the output of the real part after the inverse Fourier transform of the frequency blocking-pass amplitude function PF in Embodiment 1 of the present invention;

图3为本发明实施例1中传递函数H构成示意图;3 is a schematic diagram of the constitution of the transfer function H in Embodiment 1 of the present invention;

图4为本发明实施例1中各阶导数(差分)传递函数示意;4 is a schematic diagram of each order derivative (difference) transfer function in Embodiment 1 of the present invention;

图5为本发明实施例1中模拟光谱Sp与0阶至4阶传递函数的卷积结果;Fig. 5 is the convolution result of simulated spectrum Sp and 0th-order to 4th-order transfer function in the embodiment of the present invention 1;

图6为本发明实施例1中输出的各阶导数结果;Fig. 6 is the derivative result of each order output in the embodiment 1 of the present invention;

图7为本发明实施例2中对光谱数据Sp1直接差分结果;Fig. 7 is the direct difference result of spectral data Sp1 in the embodiment 2 of the present invention;

图8为本发明实施例2中对光谱数据Sp1采用本发明求导滤波器的导数结果;Fig. 8 is the derivative result of adopting the derivative filter of the present invention to spectral data Sp1 in the embodiment 2 of the present invention;

图9为本发明实施例2中不同处理方法的结果比较;Fig. 9 is the result comparison of different processing methods in the embodiment of the present invention 2;

图10为本发明实施例3中采用本发明方法对阿司匹林光谱处理结果。FIG. 10 is the result of spectral processing of aspirin using the method of the present invention in Example 3 of the present invention.

具体实施方式Detailed ways

以下由特定的具体实施例说明本发明的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本发明的其他优点。The embodiments of the present invention are described below by specific embodiments, and those skilled in the art can easily understand other advantages of the present invention from the contents disclosed in this specification.

一种用于数字滤波器求取光谱导数的方法,包括:步骤1,选取待进行求导的光谱Sp;步骤2,构造用于求导计算的卷积传递函数H;步骤3,通过所述卷积传递函数H,求取光谱Sp的导数。A method for obtaining a spectral derivative for a digital filter, comprising: step 1, selecting a spectrum Sp to be differentiated; step 2, constructing a convolution transfer function H for derivation calculation; step 3, passing the Convolve the transfer function H to find the derivative of the spectrum Sp.

进一步地,步骤2所述卷积传递函数H是通过以下步骤得到的:步骤a,设计平滑滤波器的传递函数PF;步骤b,对所述传递函数PF进行傅里叶逆变换,输出变换数组的实部数组,得到数组H0;步骤c,根据步骤b得到的数组H0得到卷积传递函数H。Further, the convolution transfer function H described in step 2 is obtained through the following steps: step a, design the transfer function PF of the smoothing filter; step b, perform inverse Fourier transform on the transfer function PF, and output a transform array In step c, the convolution transfer function H is obtained according to the array H0 obtained in step b.

进一步地,步骤3所述求取光谱Sp的导数包括求取Sp的0阶结果和求取Sp的n阶结果;其中,n为正整数。Further, obtaining the derivative of the spectrum Sp described in step 3 includes obtaining the 0-order result of Sp and obtaining the n-order result of Sp; wherein, n is a positive integer.

进一步地,所述求取Sp的0阶结果是通过以下方法得到的:直接计算H与被滤波的光谱数据Sp卷积;如果H中含有m个元素,从卷积结果的前后切除各m/2个元素,剩下的数组元素即对应了Sp平滑的结果,也就是0阶结果;其中,m为非负整数。Further, the 0th-order result of the described seeking Sp is obtained by the following method: directly calculate the convolution of H and the filtered spectral data Sp; if H contains m elements, remove each m/ 2 elements, and the remaining array elements correspond to the result of Sp smoothing, that is, the 0-order result; where m is a non-negative integer.

进一步地,所述求取Sp的n阶结果是通过以下方法得到的:用H差分替代求导,可以顺序获得H(1),H(2),……,H(n)等各阶差分结果,计算H的各阶差分H(n)与Sp的卷积;如果H(n)的元素个数m为偶数,从卷积结果的前后各切除m/2个,留下的元素即为Sp的n阶导数结果;如果H(n)的元素个数m为奇数,从卷积结果的前后各切除(m+1)/2个,后端切除(m-1)/2个元素,留下的元素即为Sp的n阶导数结果;Further, the n-order result of obtaining Sp is obtained by the following method: using H difference instead of derivation, H(1), H(2), ..., H(n) and other order differences can be obtained sequentially As a result, calculate the convolution of H(n) and Sp of each order difference of H; if the number of elements m of H(n) is an even number, m/2 elements are removed from the front and rear of the convolution result, and the remaining elements are The result of the n-order derivative of Sp; if the number of elements m of H(n) is an odd number, (m+1)/2 elements are removed from the front and rear of the convolution result, and (m-1)/2 elements are removed from the back end, The remaining element is the result of the n-order derivative of Sp;

其中H差分是数值计算的常识,离散计算要计算微分,以差分计算替代。Among them, the H difference is the common sense of numerical calculation, and the discrete calculation needs to calculate the differential, which is replaced by the difference calculation.

进一步地,步骤a所述传递函数PF表现为一个数组,所述传递函数PF包括带阻段Wr和带通段Wp;所述带阻段Wr选择用于描述信号带通行为的分布函数的右半部,用于设定可通过的频率百分比,所述通过的频率范围包括低频信号;所述带通段Wp用于许可频率100%通过;其中,Wr和Wp为非负整数,数越小,滤波强度越大。Further, the transfer function PF in step a is represented as an array, and the transfer function PF includes a band-stop segment Wr and a band-pass segment Wp; the band-stop segment Wr selects the right side of the distribution function used to describe the band-pass behavior of the signal. The half part is used to set the percentage of frequencies that can be passed, and the passed frequency range includes low-frequency signals; the band pass section Wp is used to allow 100% of the frequency to pass; wherein, Wr and Wp are non-negative integers, the smaller the number , the greater the filter strength.

进一步地,步骤b所述数组H0是指自输出实部数组的头部至整个数组的一半位置的数组。Further, the array H0 described in step b refers to the array from the head of the output real part array to the half position of the whole array.

进一步地,步骤c所述卷积传递函数H是通过将H0与H0前后翻转得到的H1合并,并除以所有元素的总和值得到的;所述卷积传递函数H的公式为:Further, the convolution transfer function H described in step c is obtained by merging H1 obtained by flipping H0 and H0 before and after, and dividing by the sum value of all elements; the formula of the convolution transfer function H is:

H=[H1,H0]/sum([H1,H0])。H=[H1, H0]/sum([H1, H0]).

进一步地,所述传递函数PF的公式如下:Further, the formula of the transfer function PF is as follows:

Figure BDA0002462236900000081
Figure BDA0002462236900000081

实施例1Example 1

本实施例提供一种用于数字滤波器求取光谱导数的方法,包括:The present embodiment provides a method for obtaining a spectral derivative by a digital filter, including:

首先,选取待进行求导的光谱Sp;然后,以Wr和Wp均为500,构造传递函数H,及其1、2、3、4阶传递函数H(1)、H(2)、H(3)、H(4)。First, select the spectrum Sp to be differentiated; then, with Wr and Wp both being 500, construct the transfer function H, and its 1st, 2nd, 3rd, and 4th order transfer functions H(1), H(2), H( 3), H(4).

本实施例中用于描述信号带通行为的分布函数采用高斯分布。The distribution function used to describe the bandpass behavior of the signal in this embodiment adopts Gaussian distribution.

如图1所示。设定Wp个元素均为1的数组,构成带通部分;然后,以Wr为峰宽,构造高斯峰的右半部,归一化,得到带阻部分;将两部分合并,得到完整的频率阻通幅度函数PF。As shown in Figure 1. Set an array with Wp elements of 1 to form the bandpass part; then, take Wr as the peak width, construct the right half of the Gaussian peak, normalize it, and get the bandstop part; combine the two parts to get the complete frequency The blocking amplitude function PF.

对频率阻通幅度函数PF进行逆傅里叶变换,取逆傅里叶变换结果的实部输出,如图2所示。Perform the inverse Fourier transform on the frequency block-pass amplitude function PF, and take the output of the real part of the inverse Fourier transform result, as shown in Figure 2.

取频率阻通幅度函数PF逆傅里叶变换实部的前半部分输出为H0,将H0翻转为H1,将H1和H0合并,构成传递函数H,如图3。Take the output of the first half of the real part of the inverse Fourier transform of the frequency block-pass amplitude function PF as H0, turn H0 into H1, and combine H1 and H0 to form the transfer function H, as shown in Figure 3.

图4所示的H(1)至H(4),是对H求取差分,得到的各阶导数(差分)传递函数。H( 1 ) to H( 4 ) shown in FIG. 4 are the derivative (difference) transfer functions of each order obtained by taking the difference with respect to H .

图5是一个模拟高斯峰Sp与0阶至4阶传递函数的卷积结果。从卷积结果的前后相应切除各m/2个的数据点,即可得到各阶导数结果,如图6。Figure 5 is a convolution result of a simulated Gaussian peak Sp with a transfer function of order 0 to 4. The m/2 data points are cut off before and after the convolution result, and the derivative results of each order can be obtained, as shown in Figure 6.

实施例2Example 2

本实施例提供一种用于数字滤波器求取光谱导数的方法:This embodiment provides a method for a digital filter to obtain a spectral derivative:

本实施例中用于描述信号带通行为的分布函数采用高斯分布。The distribution function used to describe the bandpass behavior of the signal in this embodiment adopts Gaussian distribution.

首先,通过构造5个不同的宽度的高斯峰,叠加最大峰高1%强度的白噪声,得到拟合的光谱数据Sp1,见图7(a)。图7(b)—(e)分别是直接1-4阶差分结果,可以看出大于1阶后,信号被噪声覆盖,几乎无法辨认。First, by constructing five Gaussian peaks with different widths and superimposing white noise with a maximum peak height of 1% intensity, the fitted spectral data Sp1 is obtained, as shown in Figure 7(a). Figure 7(b)-(e) are the direct 1-4th order difference results. It can be seen that after the order is greater than 1, the signal is covered by noise and is almost unrecognizable.

采用本发明上述提出的求导方法,依次完成平滑以及1-4阶导数计算。结果如图8所示,在滤波参数Wp=500,Wr=800时,4阶导数中的信号仍然可以有效辨识。Using the derivation method proposed above in the present invention, the smoothing and the 1-4 order derivative calculation are completed in sequence. The results are shown in Fig. 8. When the filtering parameters Wp=500 and Wr=800, the signal in the fourth-order derivative can still be effectively identified.

图9是无噪声直接2阶差分、S-G滤波2阶导数和本发明方法三种情况下的信号的2阶导数的结果对比,该图显示的是信号最窄峰宽处,此处为求导处理时误差最显著的部分。可以看出本发明与目前认为效果最好的滤波求导方法S-G滤波相比,具有更好的性能和可调节性。Figure 9 is a comparison of the results of the noise-free direct second-order difference, the second-order derivative of the S-G filter, and the second-order derivative of the signal under three conditions of the method of the present invention. The figure shows the narrowest peak width of the signal, and here is the derivative The most significant part of the error when processing. It can be seen that the present invention has better performance and adjustability than S-G filtering, which is currently considered to be the best filtering derivation method.

图9中可以看出,本发明选取的两个参数有很大的可调节余地,因此可以精细地调整出更光滑的曲线,同时在峰值处,又保持了与真实信号的一致,而S-G滤波需要在曲线平滑和真实性之间加以取舍。As can be seen from Fig. 9, the two parameters selected by the present invention have a large room for adjustment, so a smoother curve can be finely adjusted, and at the peak, the consistency with the real signal is maintained, and the S-G filter There is a trade-off between curve smoothness and realism.

实施例3Example 3

在785nm激光激发,积分时间1ms下采集分析纯阿司匹林的拉曼光谱。采用本发明上述求取导数的方法对实测的阿司匹林拉曼光谱进行4阶求导,得到4阶导数谱,如图10。Raman spectra of pure aspirin were collected and analyzed under 785nm laser excitation and 1ms integration time. Using the above-mentioned method for obtaining the derivative of the present invention, the measured Raman spectrum of aspirin is subjected to 4th order derivation to obtain the 4th order derivative spectrum, as shown in FIG. 10 .

应用本发明可计算出容易清楚辨识的四阶导数谱,对比原始谱图和导数谱图,可以发现,在导数谱上,原本重叠的拉曼峰已经完整分离,从导数谱中可以获得更为清晰、确定的信息,对于谱图的识别、辨识和深入解析,具有重要意义。By applying the present invention, the fourth-order derivative spectrum that is easy to be clearly identified can be calculated. By comparing the original spectrum and the derivative spectrum, it can be found that on the derivative spectrum, the originally overlapping Raman peaks have been completely separated. Clear and definite information is of great significance for the identification, identification and in-depth analysis of spectra.

Claims (9)

1.一种用于数字滤波器求取光谱导数的方法,其特征在于,包括:1. a method for obtaining spectral derivative for digital filter, is characterized in that, comprises: 步骤1,选取待进行求导的光谱Sp;Step 1, select the spectrum Sp to be differentiated; 步骤2,构造用于求导计算的卷积传递函数H;Step 2, constructing the convolution transfer function H for derivation calculation; 步骤3,通过所述卷积传递函数H,求取光谱Sp的导数。Step 3, through the convolution transfer function H, the derivative of the spectrum Sp is obtained. 2.如权利要求1所述的一种用于数字滤波器求取光谱导数的方法,其特征在于,步骤2所述卷积传递函数H是通过以下步骤得到的:2. a kind of method that is used for digital filter to obtain spectral derivative as claimed in claim 1, is characterized in that, the described convolution transfer function H of step 2 is obtained by following steps: 步骤a,设计平滑滤波器的传递函数PF;Step a, design the transfer function PF of the smoothing filter; 步骤b,对所述传递函数PF进行傅里叶逆变换,输出变换数组的实部数组,得到数组H0;Step b, inverse Fourier transform is performed on the transfer function PF, and the real part array of the output transform array is obtained to obtain the array H0; 步骤c,根据步骤b得到的数组H0得到卷积传递函数H。In step c, the convolution transfer function H is obtained according to the array H0 obtained in step b. 3.如权利要求1或2所述的一种用于数字滤波器求取光谱导数的方法,其特征在于,步骤3所述求取光谱Sp的导数包括求取Sp的0阶结果和求取Sp的n阶结果;其中,n为正整数。3. a kind of method that is used for digital filter to obtain spectral derivative as claimed in claim 1 and 2, is characterized in that, the described derivative of seeking spectrum Sp of step 3 comprises the 0th order result of seeking Sp and seeking The nth order result of Sp; where n is a positive integer. 4.如权利要求3所述的一种用于数字滤波器求取光谱导数的方法,其特征在于,所述求取Sp的0阶结果是通过以下方法得到的:4. a kind of method that is used for digital filter to obtain spectral derivative as claimed in claim 3, it is characterized in that, described to obtain the 0th order result of Sp is obtained by following method: 直接计算H与被滤波的光谱数据Sp卷积;directly compute the convolution of H with the filtered spectral data Sp; 如果H中含有m个元素,从卷积结果的前后切除各m/2个元素,剩下的数组元素即对应了Sp平滑的结果,也就是0阶结果;If there are m elements in H, m/2 elements are removed from the front and rear of the convolution result, and the remaining array elements correspond to the result of Sp smoothing, that is, the 0-order result; 其中,m为非负整数。where m is a non-negative integer. 5.如权利要求3或4所述的一种用于数字滤波器求取光谱导数的方法,其特征在于,所述求取Sp的n阶结果是通过以下方法得到的:5. a kind of method that is used for digital filter to obtain spectral derivative as claimed in claim 3 or 4, it is characterized in that, the n-order result of described seeking Sp is obtained by the following method: 用H差分替代求导,可以顺序获得H(1),H(2),……,H(n)等各阶差分结果,计算H的各阶差分H(n)与Sp的卷积;Using H difference instead of derivation, you can obtain H(1), H(2), ..., H(n) and other order difference results in sequence, and calculate the convolution of H(n) and Sp of each order difference of H; 如果H(n)的元素个数m为偶数,从卷积结果的前后各切除m/2个,留下的元素即为Sp的n阶导数结果;If the number of elements m of H(n) is an even number, m/2 elements are removed from the front and rear of the convolution result, and the remaining elements are the result of the n-order derivative of Sp; 如果H(n)的元素个数m为奇数,从卷积结果的前后各切除(m+1)/2个,后端切除(m-1)/2个元素,留下的元素即为Sp的n阶导数结果。If the number of elements m of H(n) is an odd number, (m+1)/2 elements are removed from the front and rear of the convolution result, and (m-1)/2 elements are removed from the back end, and the remaining element is Sp The result of the nth derivative of . 6.如权利要求3所述的一种用于数字滤波器求取光谱导数的方法,其特征在于,步骤a所述传递函数PF表现为一个数组,所述传递函数PF包括带阻段Wr和带通段Wp;6. A method for obtaining spectral derivatives for a digital filter as claimed in claim 3, wherein the transfer function PF in step a is represented as an array, and the transfer function PF comprises a band stop section Wr and Bandpass segment Wp; 所述带阻段Wr选择用于描述信号带通行为的分布函数的右半部,用于设定可通过的频率百分比;The band-stop section Wr is selected to describe the right half of the distribution function of the band-pass behavior of the signal, and is used to set the passable frequency percentage; 所述带通段Wp用于许可频率100%通过;The bandpass section Wp is used to allow 100% of the frequency to pass; 其中,Wr和Wp为非负整数。where Wr and Wp are non-negative integers. 7.如权利要求3所述的一种用于数字滤波器求取光谱导数的方法,其特征在于,步骤b所述数组H0是指自输出实部数组的头部至整个数组的一半位置的数组。7. a kind of method that is used for digital filter to obtain spectral derivative as claimed in claim 3, it is characterised in that the array H0 described in step b refers to the half position from the head of the output real part array to the whole array array. 8.如权利要求2或7所述的一种用于数字滤波器求取光谱导数的方法,其特征在于,步骤c所述卷积传递函数H是通过将H0与H0前后翻转得到的H1合并,并除以所有元素的总和值得到的;8. a kind of method that is used for digital filter to obtain spectral derivative as claimed in claim 2 or 7, it is characterized in that, the described convolution transfer function H of step c is by H0 and H0 by turning the H0 and H0 back and forth to obtain the merger , and divided by the sum of all elements; 所述卷积传递函数H的公式为:The formula of the convolution transfer function H is: H=[H1,H0]/sum([H1,H0])。H=[H1, H0]/sum([H1, H0]). 9.如权利要求3所述的一种用于数字滤波器求取光谱导数的方法,其特征在于,所述传递函数PF的公式如下:9. a kind of method that is used for digital filter to obtain spectral derivative as claimed in claim 3, is characterized in that, the formula of described transfer function PF is as follows:
Figure FDA0002462236890000031
Figure FDA0002462236890000031
CN202010323253.8A 2020-04-22 2020-04-22 Method for obtaining spectral derivative by digital filter Expired - Fee Related CN111490752B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010323253.8A CN111490752B (en) 2020-04-22 2020-04-22 Method for obtaining spectral derivative by digital filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010323253.8A CN111490752B (en) 2020-04-22 2020-04-22 Method for obtaining spectral derivative by digital filter

Publications (2)

Publication Number Publication Date
CN111490752A true CN111490752A (en) 2020-08-04
CN111490752B CN111490752B (en) 2024-02-02

Family

ID=71811979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010323253.8A Expired - Fee Related CN111490752B (en) 2020-04-22 2020-04-22 Method for obtaining spectral derivative by digital filter

Country Status (1)

Country Link
CN (1) CN111490752B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4553248A (en) * 1983-06-10 1985-11-12 International Business Machines Corporation Analog adaptive magnitude equalizer
CN101534933A (en) * 2006-05-26 2009-09-16 沃特世科技公司 Ion detection and parameter estimation for n-dimensional data
CN105814603A (en) * 2013-05-30 2016-07-27 帝国创新有限公司 method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4553248A (en) * 1983-06-10 1985-11-12 International Business Machines Corporation Analog adaptive magnitude equalizer
CN101534933A (en) * 2006-05-26 2009-09-16 沃特世科技公司 Ion detection and parameter estimation for n-dimensional data
CN105814603A (en) * 2013-05-30 2016-07-27 帝国创新有限公司 method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
文玉梅等: ""用多项式近似的图象逆滤波及空间移变系统图象的恢复"" *

Also Published As

Publication number Publication date
CN111490752B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
Unser et al. B-spline signal processing. I. Theory
Ur Rehman et al. Filter bank property of multivariate empirical mode decomposition
US7401008B2 (en) Method, computer program, and system for intrinsic timescale decomposition, filtering, and automated analysis of signals of arbitrary origin or timescale
Iacobucci Spectral analysis for economic time series
JP4510175B2 (en) Method and apparatus for suppressing unwanted components in the measurement spectrum of a spectrometer
Herff et al. Extracting features from time series
CN102631198B (en) Dynamic spectrum data processing method based on difference value extraction
Ruffin et al. A combined derivative spectroscopy and Savitzky-Golay filtering method for the analysis of hyperspectral data
CN103033481A (en) FFT-based second harmonic filtering method for laser analyzer
CN105005978A (en) Spectrum real-time filtering method based on Savitzky-Golay filter parameter optimization
TWI519276B (en) Electrocardiography signal extraction method
WO2020228047A1 (en) Inverse matrix iterative deconvolution method for spectral resolution enhancement
CN107918710B (en) Design method of non-subsampled graph filter bank based on convex optimization
CN106644075A (en) Efficient de-noising method for Fourier spectrograph
CN106073800B (en) Method for processing dynamic spectral data and its device based on absolute difference and extraction
Buslov et al. A priori estimation of the parameters of the method of spectral curve deconvolution
CN105816165A (en) Real-time dynamic heart rate monitoring device and monitoring method
JPH11148865A (en) Processing method and correction method of spectral data by two-dimensional expression
CN110988232A (en) Chromatographic baseline noise reduction method and device
Brown et al. Hazards of digital smoothing filters as a preprocessing tool in multivariate calibration
CN111490752B (en) Method for obtaining spectral derivative by digital filter
CN103308829A (en) GIS (gas insulated switchgear) single-time partial discharge signal extraction and trigger moment adjusting method
Tian et al. Tunable diode laser spectrometry signal de-noising using discrete wavelet transform for molecular spectroscopy study.
CN110470396B (en) Processing method for smoothing and denoising spectrum
CN106441388A (en) Fiber bragg grating demodulation method based on K-L conversion

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
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20240202