A method and system for detecting impurities in flunarizine hydrochloride raw material.

By combining empirical mode decomposition and baseline optimization in preprocessing, and integrating continuous wavelet transform and Gaussian-Logistic distribution function convolution model, the problems of chromatographic peak overlap and noise interference in the detection of trace impurities in flunarizine hydrochloride raw material were solved, and high-precision impurity quantification was achieved.

CN122306995APending Publication Date: 2026-06-30ZHENGZHOU RUIKANG PHARM CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHENGZHOU RUIKANG PHARM CO LTD
Filing Date
2026-04-29
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies for detecting trace impurities in flunarizine hydrochloride raw materials suffer from problems such as chromatographic peak overlap, noise interference, and baseline drift, leading to inaccurate quantification. Traditional methods cannot effectively constrain the degree of peak overlap and morphological differences, resulting in failure to quantify trace impurities.

Method used

Empirical mode decomposition is used to denoise the model, and a baseline optimization algorithm is used to generate a denoised chromatogram. The optimal analysis scale is determined by the signal-to-noise ratio metric. Continuous wavelet transform is used to identify the number of components. A convolution model of Gaussian function and modified Logistic distribution function is established, and a trust region reflection algorithm is used for nonlinear iterative fitting. A penalty regularization term is added to optimize the model parameters.

Benefits of technology

This method enables high-precision detection of trace impurities in flunarizine hydrochloride raw material, filters out complex noise, accurately identifies overlapping peaks, improves quantitative accuracy and reliability, and avoids non-physical analysis and errors of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122306995A_ABST
    Figure CN122306995A_ABST
Patent Text Reader

Abstract

This invention provides a method and system for detecting impurities in flunarizine hydrochloride raw material. The detection method includes: acquiring the original chromatographic signal, performing empirical mode decomposition for denoising and baseline optimization to obtain a baseline-corrected and denoised chromatogram; determining the signal-to-noise ratio based on the energy relationship between noise and signal in preprocessing, determining the optimal analytical scale through a preset function, determining the number of chromatographic peak components by screening ridges through continuous wavelet transform, and extracting initial model parameters; establishing a mathematical model for the convolution of a standard Gaussian function and a modified Logistic distribution function for each component peak, using a trust-region reflection algorithm for nonlinear iterative fitting, with the objective function containing a least-squares residual term and a weighted regularization term; after the objective function converges, obtaining the optimal model parameters, and calculating the integral area of ​​each impurity component peak to determine its content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of testing, and in particular relates to a method and system for detecting impurities in flunarizine hydrochloride raw material. Background Technology

[0002] High-performance liquid chromatography (HPLC) is currently the most widely used technique for drug purity detection. It analyzes chromatograms to qualitatively and quantitatively analyze the main components and various trace impurities in a sample. In practical analysis, especially in complex drug systems, overlapping or co-elution of chromatographic peaks often occurs due to the similarity of the physicochemical properties of the components. Trace impurity peaks, in particular, are easily masked by adjacent main component peaks or other impurity peaks, forming shoulder peaks or being completely hidden within the peak itself. Furthermore, instrument noise and baseline drift are also common problems. These factors collectively lead to significant errors in traditional peak area integration methods, making it impossible to accurately quantify overlapping peaks. Chemometric methods, by establishing an ideal mathematical function model for each chromatographic peak, fit overlapping chromatographic signals into a linear superposition of multiple independent peak shapes, thereby achieving precise separation and quantification of each component.

[0003] Existing methods largely rely on simple symmetric or asymmetric peak shape functions. For example, Gaussian models cannot accurately represent the tailing or forward extension of actual chromatographic peaks, leading to model mismatch and low fitting accuracy. Nonlinear fitting processes are extremely sensitive to initial parameter settings, including the number of components, the position, height, and width of each component peak. Inaccurate initial values ​​can easily cause the iterative process to get stuck in local optima or even fail to converge. Without reasonable constraints, the optimization process may generate parameters with unclear physical meaning or "fit" minute impurity peaks into the error of the main peak, leading to failure in accurate quantification of trace impurities. Current technologies generally lack a mechanism to apply constraints based on peak overlap and morphological differences to ensure the chemical rationality and reliability of the deconvolution results. Summary of the Invention

[0004] The first aspect of this disclosure provides a method for detecting impurities in flunarizine hydrochloride raw material, including: The original chromatographic signal is acquired, and a series of intrinsic mode function components are obtained through empirical mode decomposition. Several initial components that are high-frequency noise are identified and discarded to reconstruct the denoised signal. The baseline optimization algorithm is then combined to generate a baseline-corrected and denoised chromatogram. The signal-to-noise ratio (SNR) metric is determined based on the energy relationship between noise and signal during preprocessing, and the optimal analytical scale is determined by a preset function based on the metric. Under the optimal analytical scale, continuous wavelet transform is performed on the chromatogram, and the number of components in the chromatographic peaks is determined by screening the length and intensity of the ridges. The initial model parameters of each component peak are then extracted. A mathematical model is established for each component peak by convolving a standard Gaussian function with a modified Logistic distribution function; a trust region reflection algorithm is used for nonlinear iterative fitting, and the model parameters are optimized by minimizing an objective function; the objective function includes a least squares residual term and a regularization term that penalizes the difference in skewness parameters of adjacent overlapping peaks; The penalty in the regularization term uses a weighted weight, which is related to the peak overlap and peak width difference. When the objective function converges, the optimal model parameters for each component peak are obtained, and the integral area of ​​each impurity component peak is calculated based on the parameters to determine the content.

[0005] Optionally, the step of obtaining a series of intrinsic mode function components through empirical mode decomposition, identifying and discarding several initial components that are high-frequency noise to reconstruct the denoised signal includes: Calculate the Pearson correlation coefficients between the first to nth intrinsic mode function components and the original chromatographic signal in sequence; Starting from the first intrinsic mode function component, identify the first intrinsic mode function component whose Pearson correlation coefficient value is greater than a preset threshold, and denot it as the k-th component; The first to k-1 eigenmode function components are identified as high-frequency noise and discarded. The kth to nth intrinsic mode function components are superimposed to reconstruct the denoised chromatographic signal.

[0006] Optionally, the step of determining the signal-to-noise ratio metric based on the energy relationship between noise and signal in preprocessing, and determining the optimal analysis scale according to the metric through a preset function, includes: The ratio of the total energy of the discarded high-frequency noise components to the total energy of the denoised chromatographic signal is defined as the noise energy ratio NE. The optimal analytical scale is calculated using the formula scale = 32 × (1 + 50 × NE).

[0007] Optionally, the step of performing continuous wavelet transform on the chromatogram at the optimal analytical scale, and determining the number of components in the chromatographic peaks by screening the length and intensity of the ridges, includes: The wavelet mother function is selected, and continuous wavelet transform is performed on the signal at the optimal analysis scale. In the wavelet coefficient matrix, local modulus maxima are identified and connected to obtain multiple ridge lines; Only retain ridges whose length exceeds a certain number of data points and whose maximum intensity value exceeds a certain multiple of the local background noise standard deviation; The number of ridges retained after statistical screening is taken as the number of components.

[0008] Optionally, the step of establishing a mathematical model for each component peak by convolving a standard Gaussian function with a modified Logistic distribution function includes: The standard Gaussian function is an exponential function with the center position and standard deviation as parameters; The modified logistic distribution function is a function with skewness and scale parameters as parameters; The standard Gaussian function is convolved with the modified Logistic distribution function to obtain the component peak model function.

[0009] Optionally, the penalty in the regularization term employs a weighted weight, which is related to the peak overlap and peak width difference, including: In each iteration, the peaks of adjacent i-th and j-th components are calculated, and the peak area overlap of the two component peak model functions is calculated based on the peak model parameters of the current iteration. ; Calculate the relative difference in the initial peak widths of the two component peaks. ; By peak area overlap and relative differences The ratio is used to calculate the weight.

[0010] Optionally, the optimal model parameters for each component peak are obtained when the objective function converges, defined as follows: The squared L2 of the difference between the baseline-corrected and denoised chromatographic data and the sum of the peak models of all components, plus a regularization term; The regularization term is the sum of the global regularization coefficient and the square of the difference between the weights of all adjacent component peaks multiplied by the skewness parameter; The optimal model parameters for each component peak are obtained by minimizing the objective function.

[0011] The second aspect of this disclosure provides a detection system for impurities in flunarizine hydrochloride raw material, comprising the following modules: The generation module is used to acquire the original chromatographic signal, obtain a series of intrinsic mode function components through empirical mode decomposition, identify and discard several initial components as high-frequency noise to reconstruct the denoised signal, and combine the baseline optimization algorithm to generate a baseline-corrected and denoised chromatogram. The extraction module is used to determine the signal-to-noise ratio metric based on the energy relationship between noise and signal in preprocessing, and to determine the optimal analysis scale according to the metric through a preset function; under the optimal analysis scale, the chromatogram is subjected to continuous wavelet transform, and the number of components of the chromatographic peak is determined by screening the length and intensity of the ridge line, and the initial model parameters of each component peak are extracted. A module is established to create a mathematical model for each component peak, which is formed by convolving a standard Gaussian function with a modified Logistic distribution function. A trust region reflection algorithm is used for nonlinear iterative fitting, and the model parameters are optimized by minimizing an objective function. The objective function includes a least squares residual term and a regularization term that penalizes the difference in skewness parameters of adjacent overlapping peaks. The calculation module uses weighted weights for the penalty in the regularization term, and the weights are related to the peak overlap and peak width difference. When the objective function converges, the optimal model parameters of each component peak are obtained, and the integral area of ​​each impurity component peak is calculated based on the parameters to determine the content.

[0012] Preferably, the step of obtaining a series of intrinsic mode function components through empirical mode decomposition, identifying and discarding several initial components that are high-frequency noise to reconstruct the denoised signal includes: Calculate the Pearson correlation coefficients between the first to nth intrinsic mode function components and the original chromatographic signal in sequence; Starting from the first intrinsic mode function component, identify the first intrinsic mode function component whose Pearson correlation coefficient value is greater than a preset threshold, and denot it as the k-th component; The first to k-1 eigenmode function components are identified as high-frequency noise and discarded. The kth to nth intrinsic mode function components are superimposed to reconstruct the denoised chromatographic signal.

[0013] Preferably, the step of determining the signal-to-noise ratio metric based on the energy relationship between noise and signal in preprocessing, and determining the optimal analysis scale according to the metric through a preset function, includes: The ratio of the total energy of the discarded high-frequency noise components to the total energy of the denoised chromatographic signal is defined as the noise energy ratio NE. The optimal analytical scale is calculated using the formula scale = 32 × (1 + 50 × NE).

[0014] Preferably, the step of performing continuous wavelet transform on the chromatogram at the optimal analytical scale, and determining the number of components in the chromatographic peaks by screening the length and intensity of the ridges, includes: The wavelet mother function is selected, and continuous wavelet transform is performed on the signal at the optimal analysis scale. In the wavelet coefficient matrix, local modulus maxima are identified and connected to obtain multiple ridge lines; Only retain ridges whose length exceeds a certain number of data points and whose maximum intensity value exceeds a certain multiple of the local background noise standard deviation; The number of ridges retained after statistical screening is taken as the number of components.

[0015] Preferably, establishing a mathematical model for each component peak by convolving a standard Gaussian function with a modified Logistic distribution function includes: The standard Gaussian function is an exponential function with the center position and standard deviation as parameters; The modified logistic distribution function is a function with skewness and scale parameters as parameters; The standard Gaussian function is convolved with the modified Logistic distribution function to obtain the component peak model function.

[0016] Preferably, the penalty in the regularization term uses weighted weights, which are related to peak overlap and peak width difference, including: In each iteration, the peaks of adjacent i-th and j-th components are calculated, and the peak area overlap of the two component peak model functions is calculated based on the peak model parameters of the current iteration. ; Calculate the relative difference in the initial peak widths of the two component peaks. ; By peak area overlap and relative differences The ratio is used to calculate the weight.

[0017] Preferably, the optimal model parameters for each component peak when the objective function converges are defined as follows: The squared L2 of the difference between the baseline-corrected and denoised chromatographic data and the sum of the peak models of all components, plus a regularization term; The regularization term is the sum of the global regularization coefficient and the square of the difference between the weights of all adjacent component peaks multiplied by the skewness parameter; The optimal model parameters for each component peak are obtained by minimizing the objective function.

[0018] This invention provides a high-precision method for detecting impurities in flunarizine hydrochloride raw material. Preprocessing combining empirical mode decomposition and baseline optimization algorithms filters out complex noise and accurately corrects baseline drift, improving the quality of the original chromatographic signal. Analyzing using continuous wavelet transform at the optimal analytical scale determined based on the signal-to-noise ratio accurately identifies all components, including weak, hidden, and overlapping peaks, and obtains reliable initial peak parameters. The convolution model employing a Gaussian function and a modified Logistic distribution function more realistically fits the asymmetric tailing morphology of actual chromatographic peaks. Particularly in the nonlinear iterative fitting, a regularization term penalizing the difference in skewness parameters between adjacent overlapping peaks is input. The weight of this penalty is related to the peak overlap and peak width difference, avoiding the non-physical interpretations that traditional algorithms may produce when dealing with severely overlapping peaks. This improves the accuracy of peak deconvolution and the reliability of the results, achieving precise quantification of trace impurities. Attached Figure Description

[0019] Figure 1 A flowchart of the first embodiment; Figure 2 This is a schematic diagram of the original chromatographic signal and the denoised chromatographic signal. Figure 3 This is a schematic diagram illustrating the peak fitting effect of overlapping chromatographic peaks. Figure 4 This is a schematic diagram showing the relative errors of chromatographic peak model parameters under different methods. Detailed Implementation

[0020] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0021] In the first embodiment, the present invention proposes a method for detecting impurities in flunarizine hydrochloride raw material, such as... Figure 1 As shown, it includes: S1. Obtain the original chromatographic signal, obtain a series of intrinsic mode function components through empirical mode decomposition, identify and discard several initial components as high-frequency noise to reconstruct the denoised signal, and combine with the baseline optimization algorithm to generate a baseline-corrected and denoised chromatogram.

[0022] The chromatographic signal of flunarizine hydrochloride raw material was acquired using a chromatographic data system, and the time-response intensity data was saved as a two-dimensional array or CSV file format. A preprocessing procedure was performed on the raw signal array. The first step of preprocessing was denoising, using an empirical mode decomposition algorithm, such as the EMD implementation in the PyEMD library of Python, to decompose the raw signal. This process involved iterative selection, decomposing the signal into a series of intrinsic mode function components (IMFs) arranged from high frequency to low frequency and a residual component (Res). The Pearson correlation coefficient between each IMF component and the raw signal was calculated, and a correlation threshold, such as 0.1, was set. Several initial IMF components with correlation coefficients below this threshold, typically IMF1 and IMF2, were identified as high-frequency noise and discarded. The remaining IMF components and the residual component (Res) were linearly superimposed to reconstruct the denoised chromatographic signal, as shown below. Figure 2 As shown, by Figure 2As can be seen, the original chromatographic signal contains a large amount of high-frequency random noise, which seriously interferes with the identification and quantitative analysis of chromatographic peaks. After the empirical mode decomposition denoising process of this invention, the noise is filtered out, the outline of the chromatographic peaks is clear and smooth, and the key features such as the position and height of the peaks are not distorted. The second step of preprocessing is baseline correction, which uses an iterative reweighted penalized least squares algorithm, namely the airPLS algorithm, to process the denoised chromatographic signal. By iteratively fitting and smoothing the baseline in one loop, asymmetric penalty weights are applied to points where the difference between the signal point and the current baseline is positive, gradually eliminating the influence of chromatographic peaks until the baseline converges. The generated optimized baseline is subtracted from the denoised signal to obtain a baseline-corrected and denoised chromatogram.

[0023] In one embodiment, the step of obtaining a series of intrinsic mode function components through empirical mode decomposition, identifying and discarding several initial components that are high-frequency noise to reconstruct the denoised signal includes: Calculate the Pearson correlation coefficients between the first to nth intrinsic mode function components and the original chromatographic signal in sequence; Starting from the first intrinsic mode function component, identify the first intrinsic mode function component whose Pearson correlation coefficient value is greater than a preset threshold, and denot it as the k-th component; The first to k-1 eigenmode function components are identified as high-frequency noise and discarded. The kth to nth intrinsic mode function components are superimposed to reconstruct the denoised chromatographic signal.

[0024] The raw chromatographic signal x(t) with N points was collected and obtained into n intrinsic mode function components through empirical mode decomposition (EMD), denoted as . , ,..., And a residual component r(t). For each IMF component Calculate the Pearson correlation coefficient with the original signal x(t) Set a correlation threshold, preferably 0.2. Check sequentially starting from i=1, and when the first detection... When the value is greater than 0.2, record the index as k. to A total of k-1 components are considered high-frequency noise and discarded. For example, if the calculation yields... =0.08, =0.15, =0.31, then k=3. and This will be identified as noise. The remaining... to Add it to the residual component r(t), that is Thus, the denoised chromatographic signal is reconstructed.

[0025] S2, Based on the energy relationship between noise and signal in preprocessing, determine the signal-to-noise ratio metric, and determine the optimal analysis scale according to the metric through a preset function; Under the optimal analysis scale, perform continuous wavelet transform on the chromatogram, determine the number of components of the chromatographic peaks by screening the length and intensity of the ridges, and extract the initial model parameters of each component peak.

[0026] The signal-to-noise ratio (SNR) metric is calculated by summing the energy of the IMF components discarded in the preprocessing step as noise energy, which is calculated by squaring the amplitude of each discarded IMF component data point and summing the results. The sum of the energy of the IMF components used to reconstruct the signal is defined as signal energy, which is calculated by squaring the amplitude of each retained IMF component data point and summing the results. The SNR metric is the ratio of signal energy to noise energy. The optimal analysis scale for continuous wavelet transform is calculated using a predefined logarithmic function, such as the optimal analysis scale being equal to a constant *a* multiplied by the natural logarithm of the SNR metric plus a constant *b*. Constants *a* and *b* are empirically set based on instrument characteristics and historical data. A second-order Gaussian derivative function, i.e., the Mexican cap wavelet, is selected as the mother wavelet. At the calculated optimal analysis scale, a continuous wavelet transform is performed on the baseline-corrected and denoised chromatogram using functions such as *signal.cwt* from the Scipy library, generating a two-dimensional wavelet coefficient matrix. Local maxima are searched within this matrix, and a maximum-connection algorithm is used to connect consecutive maxima on the time axis to form a ridge. Set ridge length and intensity thresholds; for example, the length must span at least 10 data points, and the maximum wavelet coefficient value on the ridge must be greater than three times the preset noise level. Iterate through all ridges, discarding those that do not meet either threshold. The remaining number of ridges represents the number of components in the chromatographic peak. For each ridge, use the time point corresponding to the maximum wavelet coefficient as the initial center position parameter for that component peak. The maximum coefficient value is proportionally converted to serve as the initial height parameter A, and the transformation scale corresponding to the ridge line is used as the initial width parameter. and the initial skewness parameters Set it to 0.

[0027] In one embodiment, determining the signal-to-noise ratio metric based on the energy relationship between noise and signal during preprocessing, and determining the optimal analysis scale based on the metric using a preset function, includes: The ratio of the total energy of the discarded high-frequency noise components to the total energy of the denoised chromatographic signal is defined as the noise energy ratio NE. The optimal analytical scale is calculated using the formula scale = 32 × (1 + 50 × NE).

[0028] Based on the above denoising process, the total energy of the discarded noise components is calculated. , will be identified as noise to The sum is the total noise signal noise(t), and the energy is... This is obtained by calculating the sum of the squares of the amplitude of each data point of the signal, i.e. Similarly, the reconstructed denoised chromatographic signal is calculated. Total energy Calculate the ratio of the two to obtain the dimensionless noise energy ratio. For example, if the calculation yields... =2500, =200000, then NE = 0.0125. Substituting the NE value into the above formula, we determine the optimal analytical scale for subsequent continuous wavelet transforms. In this example, =52. The design of this function ensures that when the noise content in the signal is high, the analysis scale... The corresponding increase enhances the ability to suppress noise.

[0029] In one embodiment, the step of performing continuous wavelet transform on the chromatogram at the optimal analytical scale, and determining the number of components in the chromatographic peaks by screening the length and intensity of the ridges, includes: The wavelet mother function is selected, and continuous wavelet transform is performed on the signal at the optimal analysis scale. In the wavelet coefficient matrix, local modulus maxima are identified and connected to obtain multiple ridge lines; Only retain ridges whose length exceeds a certain number of data points and whose maximum intensity value exceeds a certain multiple of the local background noise standard deviation; The number of ridges retained after statistical screening is taken as the number of components.

[0030] The Mexican hat wavelet, known for its excellent peak detection characteristics, was selected as the wavelet mother function. The optimal analysis scale calculated in the previous step was used. As the center, in a containing Within a certain scale range, a continuous wavelet transform (CWT) is performed on the baseline-corrected and denoised chromatogram to generate a two-dimensional wavelet coefficient matrix. In this matrix, by tracking the local modulus maxima of the wavelet coefficient values ​​at different scales, multiple ridges can be formed, each theoretically corresponding to a chromatographic peak. To filter out spurious peaks caused by noise, all ridges are screened: a length threshold is set, preferably 15 data points, meaning the ridge must span at least 15 consecutive analytical scales to ensure that the ridge corresponds to a real chromatographic peak with a certain width rather than transient noise. An intensity threshold is set, which estimates the standard deviation of the background noise by calculating the median absolute difference (MAD) of the wavelet coefficients at the smallest analytical scale. ,Right now ≈MAD / 0.6745, and set the threshold to a specific multiple of this standard deviation, preferably 3 times, that is, the maximum coefficient modulus on the ridge line must be greater than 0.6745. Ridges that simultaneously meet the length and intensity requirements are retained, and the number of retained ridges is the number of components with overlapping peaks in the chromatogram.

[0031] S3 establishes a mathematical model for each component peak by convolving a standard Gaussian function with a modified Logistic distribution function; a trust region reflection algorithm is used for nonlinear iterative fitting, and the model parameters are optimized by minimizing an objective function; the objective function includes a least squares residual term and a regularization term that penalizes the difference in skewness parameters of adjacent overlapping peaks.

[0032] For the i-th component peak, the mathematical model consists of two functions constructed through numerical convolution. The first function is a standard Gaussian function, in the form of... The second function is the modified Logistic distribution function, with the probability density function in the form of: The Fast Fourier Transform (FFT) algorithm is used to numerically convolve the two functions mentioned above to obtain the peak shape function. The peak shape functions of all component peaks are multiplied by their respective height parameters A and then summed to form the overall fitted model function. A trust region reflection algorithm is employed, for example, by calling the `optimize.least_squares` function in the SciPy library and specifying the method as `trf`, to apply the model parameter set, which includes the height A and center position of all component peaks. ,width and skewness The optimization aims to minimize a user-defined objective function, which consists of two parts: the first part is the least-squares residual term, which is the sum of squares of the differences between the experimental chromatogram data points and the total fitted model function values ​​at the corresponding time points. The second part is the regularization term, in the form of regularization coefficients. Multiply by the difference in skewness parameters of all adjacent overlapping peak pairs - The weighted sum of the squares.

[0033] In one embodiment, establishing a mathematical model for each component peak by convolving a standard Gaussian function with a modified Logistic distribution function includes: The standard Gaussian function is an exponential function with the center position and standard deviation as parameters; The modified logistic distribution function is a function with skewness and scale parameters as parameters; The standard Gaussian function is convolved with the modified Logistic distribution function to obtain the component peak model function.

[0034] To accurately represent asymmetric chromatographic peak shapes, the mathematical model P(t) for each component peak is formed by the convolution of two parts. The first part is the standard Gaussian function G(t), expressed as follows: The symmetrical broadening of the peak was simulated, in which As the center of the peak, The width parameter is related to the peak standard deviation. The second part is the modified logistic distribution function L(t), used for input asymmetry, which can be defined as follows: Among them, the skewness parameter The degree and direction of peak asymmetry were controlled. The component peak model function P(t) is obtained by numerical convolution of G(t) and L(t), and multiplied by an amplitude parameter A, i.e. The complete model representing the i-th component peak has four optimizable parameters: amplitude. Central position ,width and skewness .

[0035] S4, the penalty in the regularization term adopts a weighted weight, which is related to the peak overlap and peak width difference; when the objective function converges, the optimal model parameters of each component peak are obtained, and the integral area of ​​each impurity component peak is calculated based on the parameters to determine the content.

[0036] In each iteration, for any two adjacent chromatographic peaks i and j, a penalty weight w is calculated; this weight is obtained by multiplying two parts, the first part being the peak overlap O, calculated using the following formula: The second part is the peak width similarity S, calculated using the following formula: The weight w is equal to w = O × S. This weight is applied to the skewness penalty of the corresponding peak pair in the regularization term; the iterative process of the trust region reflection algorithm continues until the change in the objective function value is less than the preset convergence tolerance. If the change in model parameters is less than another preset tolerance, the iteration terminates and the algorithm converges. The set of parameters obtained after convergence is the optimal model parameters for each component peak, including the optimal height A and center position. ,width and skewness For each component peak identified as an impurity, the integrated area is calculated by multiplying the optimal height parameter A by the optimal width parameter. To calculate accurately, multiply by the square root of twice pi, that is... Based on the external standard method or area normalization method, the percentage content of each impurity component in flunarizine hydrochloride raw material is calculated using the integrated area of ​​each impurity component peak according to the formula specified in the pharmacopoeia, and this invention can separate highly overlapping chromatographic peaks through Gaussian-corrected logistic convolution model and weighted regularization fitting, such as... Figure 3 As shown, the total signal is precisely decomposed into the independent peak shapes of each component.

[0037] In one embodiment, the penalty in the regularization term employs weighted weights that are related to peak overlap and peak width difference, including: In each iteration, the peaks of adjacent i-th and j-th components are calculated, and the peak area overlap of the two component peak model functions is calculated based on the peak model parameters of the current iteration. ; Calculate the relative difference in the initial peak widths of the two component peaks. ; By peak area overlap and relative differences The ratio is used to calculate the weight.

[0038] In each iteration of the nonlinear fitting, for adjacent i-th and j-th component peaks on the chromatogram, the weights are... The calculation steps are as follows: based on the parameters of the current iteration and Generate two peak-shaped functions and Calculate their overlapping area. and their respective total areas and Peak area overlap is defined as... The value range is [0,1]. Calculate the relative difference in the initial peak widths of the two peaks. Initial peak width and These are initial estimates obtained before fitting begins using methods such as CWT ridge analysis, and remain unchanged. Relative Difference Through the formula Calculate the weights. Where... For a tiny positive number, for example This prevents the denominator from being zero when the initial peak widths are similar. This weighting mechanism ensures that when two peaks have high overlap and similar initial widths, the denominator is zero. The value is increased, thus imposing a stronger penalty on their skewness differences in the objective function.

[0039] In one embodiment, the optimal model parameters for each component peak are obtained when the objective function converges, defined as follows: The squared L2 of the difference between the baseline-corrected and denoised chromatographic data and the sum of the peak models of all components, plus a regularization term; The regularization term is the sum of the global regularization coefficient and the square of the difference between the weights of all adjacent component peaks multiplied by the skewness parameter; The optimal model parameters for each component peak are obtained by minimizing the objective function.

[0040] To find the optimal set of model parameters for N component peaks Construct and minimize the following objective function This function consists of two items: The first term is the least squares residual term, where y(t) represents the experimentally measured chromatographic data points. The first term is the sum of all N model peaks, ensuring that the fit approximates the original data overall. The second term is the regularization penalty, where... This is the global regularization coefficient, used to balance goodness of fit and model smoothness; its value can be set to 1.0. (Summarization symbol) This indicates that all adjacent peak pairs are traversed. The aforementioned weights, and This is the skewness parameter of adjacent peaks. The core function of this regularization term is to force the peak shapes to be similar when two peaks from similar physical sources appear, conforming to the physicochemical laws of chromatographic separation. The trust-region reflection algorithm is used to apply this to the objective function. Perform nonlinear iterative minimization until the change in parameters or the change in function value is less than a convergence threshold, for example... The optimal model parameters for each component peak were obtained.

[0041] To verify the rationality of the weighted regularization term in the analysis of overlapping peaks, a control experiment was planned.

[0042] The experimental conditions were as follows: A synthetic signal containing two highly overlapping chromatographic peaks was constructed. The true parameters for peak one were amplitude 1.0, center 100, width 5.0, and skewness 2.0; the true parameters for peak two were amplitude 0.8, center 108, width 5.5, and skewness 2.2. 30 dB of Gaussian white noise was added to the signal. The control group was fitted using standard nonlinear least squares fitting, with the objective function containing only the sum of squared residuals. The experimental group used the method proposed in this invention, with the objective function including a weighted skewness regularization term and a global regularization coefficient set to 1.0. The evaluation indicators were the relative error of each fitting parameter and the overall goodness-of-fit R-squared value.

[0043] The relative errors of the control group for the amplitude, center, width, and skewness parameters of peak one were 4.8 percentage points, 0.3 percentage points, 18.5 percentage points, and 31.2 percentage points, respectively; and the corresponding errors for peak two were 5.5 percentage points, 0.4 percentage points, 21.3 percentage points, and 35.8 percentage points, respectively, with a goodness-of-fit R-squared value of 0.9981. The relative errors of the experimental group for the amplitude, center, width, and skewness parameters of peak one were 1.9 percentage points, 0.1 percentage points, 3.6 percentage points, and 4.5 percentage points, respectively; and the corresponding errors for peak two were 2.3 percentage points, 0.1 percentage points, 4.1 percentage points, and 5.2 percentage points, respectively, with a goodness-of-fit R-squared value of 0.9994.

[0044] While the control group achieved a high goodness of fit, it exhibited significant bias in distinguishing between two similar and overlapping peaks, particularly with large errors in the two strongly coupled parameters of width and skewness. Figure 4 As shown, by Figure 4 As can be seen, compared with the control group, the experimental group achieved a reduction in the relative fitting errors of key parameters such as amplitude, width, and skewness. Specifically, the relative error of the skewness parameter decreased by over 85%, and the width parameter by over 80%, fully verifying the improvement effect of the method of this invention on the fitting accuracy of overlapping peak parameters. The improvement analysis of this invention lies in the fact that the weighted regularization term provides key prior knowledge for parameter optimization, namely, that adjacent components with similar physicochemical processes should also have similar peak shape skewness. For peak pairs with high peak area overlap and similar initial widths, this term imposes a strong penalty, constraining the search range of the solution space and preventing the algorithm from getting trapped in local minima that are only mathematically optimal but physically incorrect. This fundamentally solves the parameter ambiguity problem and improves the identification and accuracy of model parameters.

[0045] In a second embodiment, the present invention also provides a detection system for impurities in flunarizine hydrochloride raw material, comprising the following modules: The generation module is used to acquire the original chromatographic signal, obtain a series of intrinsic mode function components through empirical mode decomposition, identify and discard several initial components as high-frequency noise to reconstruct the denoised signal, and combine the baseline optimization algorithm to generate a baseline-corrected and denoised chromatogram. The extraction module is used to determine the signal-to-noise ratio metric based on the energy relationship between noise and signal in preprocessing, and to determine the optimal analysis scale according to the metric through a preset function; under the optimal analysis scale, the chromatogram is subjected to continuous wavelet transform, and the number of components of the chromatographic peak is determined by screening the length and intensity of the ridge line, and the initial model parameters of each component peak are extracted. A module is established to create a mathematical model for each component peak, which is formed by convolving a standard Gaussian function with a modified Logistic distribution function. A trust region reflection algorithm is used for nonlinear iterative fitting, and the model parameters are optimized by minimizing an objective function. The objective function includes a least squares residual term and a regularization term that penalizes the difference in skewness parameters of adjacent overlapping peaks. The calculation module uses weighted weights for the penalty in the regularization term, and the weights are related to the peak overlap and peak width difference. When the objective function converges, the optimal model parameters of each component peak are obtained, and the integral area of ​​each impurity component peak is calculated based on the parameters to determine the content.

[0046] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0047] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for detecting impurities in flunarizine hydrochloride raw material, characterized in that, include: The original chromatographic signal is acquired, and a series of intrinsic mode function components are obtained through empirical mode decomposition. Several initial components that are high-frequency noise are identified and discarded to reconstruct the denoised signal. The baseline optimization algorithm is then combined to generate a baseline-corrected and denoised chromatogram. The signal-to-noise ratio (SNR) metric is determined based on the energy relationship between noise and signal during preprocessing, and the optimal analytical scale is determined by a preset function based on the metric. Under the optimal analytical scale, continuous wavelet transform is performed on the chromatogram, and the number of components in the chromatographic peaks is determined by screening the length and intensity of the ridges. The initial model parameters of each component peak are then extracted. A mathematical model is established for each component peak by convolving a standard Gaussian function with a modified Logistic distribution function; a trust region reflection algorithm is used for nonlinear iterative fitting, and the model parameters are optimized by minimizing an objective function; the objective function includes a least squares residual term and a regularization term that penalizes the difference in skewness parameters of adjacent overlapping peaks; The penalty in the regularization term uses a weighted weight, which is related to the peak overlap and peak width difference. When the objective function converges, the optimal model parameters for each component peak are obtained, and the integral area of ​​each impurity component peak is calculated based on the parameters to determine the content.

2. The method according to claim 1, characterized in that, The process of obtaining a series of intrinsic mode function components through empirical mode decomposition, identifying and discarding several initial components that are high-frequency noise to reconstruct the denoised signal includes: Calculate the Pearson correlation coefficients between the first to nth intrinsic mode function components and the original chromatographic signal in sequence; Starting from the first intrinsic mode function component, identify the first intrinsic mode function component whose Pearson correlation coefficient value is greater than a preset threshold, and denot it as the k-th component; The first to k-1 eigenmode function components are identified as high-frequency noise and discarded. The kth to nth intrinsic mode function components are superimposed to reconstruct the denoised chromatographic signal.

3. The method according to claim 1, characterized in that, The process of determining the signal-to-noise ratio metric based on the energy relationship between noise and signal during preprocessing, and determining the optimal analysis scale using a preset function based on the metric, includes: The ratio of the total energy of the discarded high-frequency noise components to the total energy of the denoised chromatographic signal is defined as the noise energy ratio NE. The optimal analytical scale is calculated using the formula scale = 32 × (1 + 50 × NE).

4. The method according to claim 1, characterized in that, The step of performing continuous wavelet transform on the chromatogram at the optimal analytical scale, and determining the number of components in the chromatographic peaks by screening the length and intensity of the ridges, includes: The wavelet mother function is selected, and continuous wavelet transform is performed on the signal at the optimal analysis scale. In the wavelet coefficient matrix, local modulus maxima are identified and connected to obtain multiple ridge lines; Only retain ridges whose length exceeds a certain number of data points and whose maximum intensity value exceeds a certain multiple of the local background noise standard deviation; The number of ridges retained after statistical screening is taken as the number of components.

5. The method according to claim 1, characterized in that, The mathematical model established for each component peak, consisting of the convolution of a standard Gaussian function and a modified Logistic distribution function, includes: The standard Gaussian function is an exponential function with the center position and standard deviation as parameters; The modified logistic distribution function is a function with skewness and scale parameters as parameters; The standard Gaussian function is convolved with the modified Logistic distribution function to obtain the component peak model function.

6. The method according to claim 1 or 5, characterized in that, The penalty in the regularization term uses weighted weights, which are related to peak overlap and peak width difference, including: In each iteration, the peaks of adjacent i-th and j-th components are calculated, and the peak area overlap of the two component peak model functions is calculated based on the peak model parameters of the current iteration. ; Calculate the relative difference in the initial peak widths of the two component peaks. ; By peak area overlap and relative differences The ratio is used to calculate the weight.

7. The method according to claim 1, characterized in that, The optimal model parameters for each component peak are obtained when the objective function converges, defined as follows: The squared L2 of the difference between the baseline-corrected and denoised chromatographic data and the sum of the peak models of all components, plus a regularization term; The regularization term is the sum of the global regularization coefficient and the square of the difference between the weights of all adjacent component peaks multiplied by the skewness parameter; The optimal model parameters for each component peak are obtained by minimizing the objective function.

8. A detection system for impurities in flunarizine hydrochloride raw material, characterized in that, Includes the following modules: The generation module is used to acquire the original chromatographic signal, obtain a series of intrinsic mode function components through empirical mode decomposition, identify and discard several initial components as high-frequency noise to reconstruct the denoised signal, and combine the baseline optimization algorithm to generate a baseline-corrected and denoised chromatogram. The extraction module is used to determine the signal-to-noise ratio metric based on the energy relationship between noise and signal in preprocessing, and to determine the optimal analysis scale according to the metric through a preset function; At the optimal analytical scale, continuous wavelet transform is performed on the chromatogram, and the number of components in the chromatographic peaks is determined by screening the length and intensity of the ridges, and the initial model parameters of each component peak are extracted. A module is established to create a mathematical model for each component peak, which is formed by convolving a standard Gaussian function with a modified Logistic distribution function. A trust region reflection algorithm is used for nonlinear iterative fitting, and the model parameters are optimized by minimizing an objective function. The objective function includes a least squares residual term and a regularization term that penalizes the difference in skewness parameters of adjacent overlapping peaks. The calculation module uses weighted weights for the penalty in the regularization term, and the weights are related to the peak overlap and peak width difference. When the objective function converges, the optimal model parameters of each component peak are obtained, and the integral area of ​​each impurity component peak is calculated based on the parameters to determine the content.

9. The system according to claim 8, characterized in that, The process of obtaining a series of intrinsic mode function components through empirical mode decomposition, identifying and discarding several initial components that are high-frequency noise to reconstruct the denoised signal includes: Calculate the Pearson correlation coefficients between the first to nth intrinsic mode function components and the original chromatographic signal in sequence; Starting from the first intrinsic mode function component, identify the first intrinsic mode function component whose Pearson correlation coefficient value is greater than a preset threshold, and denot it as the k-th component; The first to k-1 eigenmode function components are identified as high-frequency noise and discarded. The kth to nth intrinsic mode function components are superimposed to reconstruct the denoised chromatographic signal.

10. The system according to claim 8, characterized in that, The process of determining the signal-to-noise ratio metric based on the energy relationship between noise and signal during preprocessing, and determining the optimal analysis scale using a preset function based on the metric, includes: The ratio of the total energy of the discarded high-frequency noise components to the total energy of the denoised chromatographic signal is defined as the noise energy ratio NE. The optimal analytical scale is calculated using the formula scale = 32 × (1 + 50 × NE).