A method for detecting internal substances in fruits based on terahertz signal phase characteristics
By analyzing the frequency domain phase characteristics of fruits using terahertz waves and fitting a quadratic function relationship, the sensitivity and speed issues of detecting substances inside fruits were resolved, enabling accurate detection of carbendazim mass fraction.
Patent Information
- Application Number
- CN202211012692.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2042-08-23
AI Technical Summary
Existing methods for detecting substances inside fruits are not sensitive enough and not fast enough, and cannot effectively quantify the components inside fruits.
Terahertz waves are used to detect substances inside fruits. By analyzing the frequency domain phase characteristics, a quadratic function relationship is fitted, and an objective function is established to achieve quantitative detection of substances inside fruits.
It achieves highly sensitive, rapid and accurate quantitative detection of substances inside fruits, especially with an error of less than 2.63% in detecting the mass fraction of carbendazim, which meets practical needs.
Smart Images

Figure CN115389451B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of post-harvest processing of fruits, and specifically relates to a method for fitting a nonlinear relationship with the internal substance status of fruits based on the phase characteristics of terahertz signals and optimizing its detection parameters to realize the detection of internal substances in fruits. Background Art
[0002] Terahertz radiation is a general term for electromagnetic radiation in a specific band. It refers to electromagnetic waves with frequencies ranging from 0.3 terahertz to 10 terahertz, also known as terahertz waves. The terahertz range in the context of the electromagnetic spectrum is between the low-energy bound microwave region and the high-energy bound infrared region. In material analysis, the terahertz band is currently a hot research area. The special position of terahertz waves in the electromagnetic spectrum makes terahertz waves have irreplaceable characteristics compared to light waves generated by other light sources. The frequency of terahertz signals is in the range of 0.1 to 10 THz, and its photon energy is only 4.1 MeV. This energy level is lower than the bond energy of various chemical bonds, so it will not produce harmful ionization reactions, so it is safe for the human body. The pulse range of terahertz is ps level, which can be used for high time resolution research on various materials (including liquids, semiconductors, biological samples, etc.). At the same time, the wavelength of terahertz is small enough and the frequency is high, which can provide high-resolution images and reach the sub-millimeter range. This enables the analysis of the spectral properties of a substance to produce a wider bandwidth than radio frequency electronics. It also ensures that the terahertz signal can suppress background noise and produce a satisfactory signal with a high signal-to-noise ratio. In the process of optical sampling, the amplitude and phase information of the terahertz signal can be obtained, which is conducive to extracting the optical characteristics of the substance (refractive index, absorption coefficient). This ensures that the terahertz can directly obtain the optical characteristics, avoiding the arithmetic process of deriving other optical parameters of the substance by obtaining a single characteristic of the substance (such as refractive index) using the Kramers-Kronig relationship, and improving the computational efficiency of extracting the optical parameters of the substance by the terahertz signal. The photon energy of terahertz is only millielectronvolts. Since the terahertz energy is very small, it will not have a destructive effect on the substance, ensuring the integrity of the object to be tested, and the terahertz wave does not produce any harmful photoionization effect on the human body or other biological tissues, which ensures the safety of terahertz technology for the human body. Various solid and gaseous substances can present unique characterization information in the terahertz range. For many macromolecules (such as proteins, glucose, etc.), their vibrational and rotational energy levels are located in the terahertz band. By analyzing their absorption peaks, the types and inherent properties of substances can be effectively identified. It can be seen that compared with traditional drug detection methods such as high-performance liquid chromatography and gas chromatography-mass spectrometry, the use of terahertz time-domain spectroscopy technology to detect internal substances in fruits can be highly sensitive, fast and efficient, and is a potential method for rapid substance detection. Summary of the invention
[0003] The purpose of the present invention is to analyze the phase characteristics of the fruit internal substance detection system from the perspective of frequency domain when using the terahertz wave, so as to consider screening the main frequency characteristic points so that the frequency domain phase signal is associated with the fruit internal substances such as soluble solids, water and sugar, and to fit the nonlinear relationship between the internal substance and the characteristic signal by a one-variable quadratic function, and to establish an internal substance status target function for the phase information of the main frequency characteristic points after screening to obtain the relationship between the phase characteristics and the internal substance content, thereby realizing the quantitative detection of the internal substance of the fruit.
[0004] In order to achieve the above object, the present invention includes Figure 1 The following steps are shown in :
[0005] Step 1: When a certain internal substance in a certain batch of K samples of a certain fruit is detected by terahertz wave, a certain internal substance indicator x of fruit k (k∈K) is assumed to be i,k and the i-th main frequency feature point λ after screening i The frequency domain phase signal y i,k There is a quadratic function relationship that can be fitted, namely where a i 、b i 、c i are the quadratic term coefficient, linear term coefficient and constant term of the fitting relationship, and the internal material condition x k can be Indicates, where I is the number of main frequency feature points, w i is the weight coefficient of the main frequency feature point, and To detect the internal substances of the fruit, the variable w can be used i 、a i 、b i 、c i Establish an objective function to minimize the weighted square sum of the signal deviation between the fitted phase and the actual phase when detecting the internal substance of the batch of fruit samples
[0006]
[0007]
[0008] Considering the constraints in the objective function The limiting condition can be introduced into H(w i ,a i ,b i ,c i ), which is transformed into an equivalent objective function to minimize the weighted sum of squares of the signal deviation between the fitted phase and the actual phase
[0009]
[0010] It can be seen that the above two objective functions are equivalent to each other;
[0011] Step 2: Minimize the weighted sum of squares of the signal deviation between the fitted phase and the actual phase in the equivalent objective function G(w i ,a i ,b i ,c i ,λ) for w i Finding the first-order derivative and the second-order derivative, we can get the corresponding first-order derivative and second-order derivative expressions:
[0012]
[0013]
[0014] It is obvious that the second-order derivative Greater than 0, when setting the first-order derivative When, we can optimize w i G(w i ,a i ,b i ,c i ,ρ) satisfies the minimum condition, thus achieving min{G(w i ,a i ,b i ,c i ,ρ)} holds.
[0015] Depend on We can get:
[0016]
[0017] Depend on We can get G(w i ,a i ,b i ,c i ,ρ) is the weight coefficient w of the main frequency feature point when it meets the minimum condition i The optimized value expression of is:
[0018]
[0019] Step 3: G(w i ,a i ,b i ,c i ,λ) for a i ,b i ,c i By calculating the first-order derivative and the second-order derivative respectively, we can get the corresponding first-order derivative and second-order derivative expressions:
[0020]
[0021] Among them, considering the fitting situation Should be close to y i,k , which can meet the situation that sinα≈α when α→0;
[0022]
[0023]
[0024]
[0025]
[0026]
[0027] Obvious second derivative and Greater than 0, when the first-order derivative When, we can optimize a i ,b i ,c i G(w i ,a i ,b i ,c i ,ρ) satisfies the minimum condition, thus achieving min{G(w i ,a i ,b i ,c i ,ρ)} holds.
[0028] According to the first-order derivative The following set of equations can be established:
[0029]
[0030] make as well as Among them, 0≤m≤4, 0≤n≤2, we can know that p m ,q n > 0, the system of equations can be rewritten into matrix form
[0031]
[0032] Can be ordered and For the elements in P, we know that P∈R n×n In the non-singular case, we can get G(w i ,a i ,b i ,ci ,ρ) when the quadratic term coefficient of the fitting relationship meets the minimum condition i , linear coefficient b i and the constant term c i The optimized value expression of
[0033]
[0034] Step 4: The weight coefficient w of the main frequency feature point can be i , quadratic coefficient a i , linear coefficient b i and the constant term c i Substitute the optimized value into the iterative process from step 4.1 to step 4.4 below to generate the actual value w′ of the weight coefficient i , the actual value of the quadratic term coefficient a′ i , the actual value of the coefficient of the first-order term b′ i and the actual value of the constant term c′ i :Step 4.1: Initialization process will As the initial value of the weight coefficient, the main frequency feature points λ of K sample fruits in the sample set are tested experimentally. i The frequency domain phase signal y i,k And the internal material condition x k , and then substitute the quadratic coefficient a i , linear coefficient b i and the constant term c i The optimized value expression of the quadratic term coefficient a is obtained i , linear coefficient b i and the constant term c i The initial value of the quadratic term is set to 0, and the number of iterations n is set to 0; Step 4.2: Set the quadratic term coefficient a i (n), linear coefficient b i (n) and the constant term c i (n) Substitute the weight coefficient w i The optimized value expression of (n) is obtained to obtain w i (n+1),
[0035] Step 4.3: Set the weight coefficient w i (n+1) Substitute the quadratic term coefficient a i , linear coefficient b i and the constant term c i The optimized value expression of the quadratic term coefficient a is obtained i (n+1), linear coefficient b i (n+1) and the constant term c i (n+1), at this time the number of iterations n is set to n+1;
[0036] Step 4.4: If satisfied and Then the output is w i (n+1), a i (n+1), b i (n+1) and c i (n+1) is the actual value w′ of the weight coefficient i , the actual value of the quadratic coefficient of the fitting relationship a′ i , the actual value of the coefficient of the first-order term b′ i and the actual value of the constant term c′ i And end the iteration process, where Δ is the parameter deviation ratio threshold, otherwise go to step 4.2;
[0037] Step 5: The main frequency feature point λ generated by the iterative process in step 4 can be i The actual value of the weight coefficient w′ i , the actual value of the quadratic coefficient of the fitting relationship a′ i , the actual value of the coefficient of the first-order term b′ i and the actual value of the constant term c′ i It is used to detect the internal substances of the fruit h that needs to be detected. Through the relevant detection equipment, I different main frequency characteristic points λ can be obtained i The frequency domain phase signal y i,h , then The fitting relationship can be used to obtain the internal material status of fruit h BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 : Flowchart of detection of internal substances in fruits based on the phase characteristics of terahertz signals. DETAILED DESCRIPTION
[0039] The following is a detailed description of the technical solution provided by the present invention using a specific embodiment of the phase characteristics of a terahertz signal to detect the mass fraction of carbendazim in orange, which specifically includes: Figure 1 The following steps are shown in :
[0040] Step 1: When a total of K = 50 orange samples are tested for carbendazim by terahertz wave, it can be found that carbendazim has two obvious hump-shaped characteristic absorption peaks at 1.16 THz and 1.35 THz. Therefore, the carbendazim indicator x of orange k (k∈K) can be set as i,k The frequency domain phase signal y corresponding to the two main frequency feature points λ1 = 1.16THz and λ2 = 1.35THz after screening i,k There is a quadratic function relationship that can be fitted, namely where a i 、b i 、ci are the quadratic term coefficient, linear term coefficient and constant term of the fitting relationship, and the mass fraction of carbendazim x k can be Indicates that the number of main frequency feature points is I = 2, i∈[1,2], w i is the weight coefficient of the main frequency feature point, and To realize the detection of carbendazim inside orange, the variable w can be used i 、a i 、b i 、c i The objective function of minimizing the weighted square sum of the signal deviation between the fitted phase and the actual phase when detecting carbendazim in this batch of orange sample sets was established.
[0041]
[0042]
[0043] Considering the constraints in the objective function The limiting condition can be introduced into H(w i ,a i ,b i ,c i ), which is transformed into an equivalent objective function to minimize the weighted sum of squares of the signal deviation between the fitted phase and the actual phase
[0044]
[0045] It can be seen that the above two objective functions are equivalent to each other;
[0046] Step 2: Minimize the weighted sum of squares of the signal deviation between the fitted phase and the actual phase in the equivalent objective function G(w i ,a i ,b i ,c i ,λ) for w i Finding the first-order derivative and the second-order derivative, we can get the corresponding first-order derivative and second-order derivative expressions:
[0047]
[0048]
[0049] It is obvious that the second-order derivative Greater than 0, when setting the first-order derivative When, we can optimize w i G(w i ,a i ,b i ,c i,ρ) satisfies the minimum condition, thus achieving min{G(w i ,a i ,b i ,c i ,ρ)} holds.
[0050] Depend on and We can get G(w i ,a i ,b i ,c i ,ρ) is the weight coefficient w of the main frequency feature point when it meets the minimum condition i The optimized value expression of is:
[0051]
[0052] Step 3: G(w i ,a i ,b i ,c i ,λ) for a i ,b i ,c i By calculating the first-order derivative and the second-order derivative respectively, we can get the corresponding first-order derivative and second-order derivative expressions:
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059] Obvious second derivative and Greater than 0, when the first-order derivative When, we can optimize a i ,b i ,c i G(w i ,a i ,b i ,c i ,ρ) satisfies the minimum condition, thus achieving min{G(w i ,a i ,b i ,c i,ρ)} holds.
[0060] make as well as Among them, 0≤m≤4, 0≤n≤2, we can know that p m ,q n > 0, the system of equations can be rewritten into matrix form
[0061]
[0062] Can be ordered and For the elements in P, we know that P∈R n×n In the non-singular case, we can get G(w i ,a i ,b i ,c i ,ρ) when the quadratic term coefficient of the fitting relationship meets the minimum condition i , linear coefficient b i and the constant term c i The optimized value expression of
[0063]
[0064] Step 4: The weight coefficient w of the main frequency feature point can be i , quadratic coefficient a i , linear coefficient b i and the constant term c i Substitute the optimized value into the iterative process from step 4.1 to step 4.4 below to generate the actual value w′ of the weight coefficient i , the actual value of the quadratic term coefficient a′ i , the actual value of the coefficient of the first-order term b′ i and the actual value of the constant term c′ i :Step 4.1: Initialization process will w i =0.5 as the initial value of the weight coefficient, and the frequency domain phase signal y of the main frequency feature points λ1 = 1.16THz and λ2 = 1.35THz of K = 50 sample fruits in the sample set is tested experimentally. i,k And the mass fraction of carbendazim x k , and then substitute the quadratic coefficient a i , linear coefficient b i and the constant term c i The optimized value expression of the quadratic term coefficient a is obtained i , linear coefficient b i and the constant term c i The initial value of , and the number of iterations n is set to 0;
[0065] Step 4.2: Substitute the quadratic coefficient ai (n), linear coefficient b i (n) and the constant term c i (n) Substitute the weight coefficient w i The optimized value expression of (n) is obtained to obtain w i (n+1),
[0066] Step 4.3: Set the weight coefficient w i (n+1) Substitute the quadratic term coefficient a i , linear coefficient b i and the constant term c i The optimized value expression of the quadratic term coefficient a is obtained i (n+1), linear coefficient b i (n+1) and the constant term c i (n+1), at this time the number of iterations n is set to n+1;
[0067] Step 4.4: If satisfied and Then the output is w i (n+1), a i (n+1), b i (n+1) and c i (n+1) is the actual value w′ of the weight coefficient i , the actual value of the quadratic coefficient of the fitting relationship a′ i , the actual value of the coefficient of the first-order term b′ i and the actual value of the constant term c′ i The iteration process ends, wherein the parameter deviation ratio threshold Δ=1%, otherwise it goes to step 4.2. Usually, the iteration process can be completed within the number of iterations n of 20;
[0068] Step 5: The actual values of the weight coefficients of the main frequency characteristic points λ1=1.16THz and λ2=1.35THz generated by the iterative process in step 4, the actual values of the quadratic term coefficients of the fitting relationship, the actual values of the linear term coefficients and the actual values of the constant term can be used for the detection of carbendazim in 10 oranges in the detection experiment, and the carbendazim mass fraction of the orange is obtained through the fitting relationship corresponding to the frequency domain phase signal of two different main frequency characteristic points, wherein the carbendazim mass fraction of the orange is between 0.1% and 0.5%. The test experiment results show that the average error of the carbendazim mass fraction is 2.63%, which shows that the fitting results obtained by this method are basically consistent with the actual results, which can meet the actual needs of detecting the carbendazim mass fraction in oranges, so as to achieve the purpose of using the terahertz signal phase characteristics to detect the internal substances of fruits.
Claims
1. A method for detecting internal substances in fruits based on the phase characteristics of terahertz signals, characterized in that: The following steps are involved: Step 1: When a certain internal substance in a certain batch of K samples of a certain fruit is detected by terahertz wave, a certain internal substance indicator x of fruit k, k∈K i,k and the i-th main frequency feature point λ after screening i The frequency domain phase signal y i,k exist The fit relationship is: i , b i 、c i are the quadratic term coefficient, linear term coefficient and constant term of the fitting relationship, and the internal material condition x k can be Indicates, where I is the number of main frequency feature points, w i is the weight coefficient of the main frequency feature point, and To detect the internal substances of the fruit, the variable w can be used i 、a i , b i 、c i Establish an objective function to minimize the weighted square sum of the signal deviation between the fitted phase and the actual phase when detecting the internal substance of the batch of fruit samples Considering the constraints in the objective function The limiting condition can be introduced into H(w i ,a i ,b i ,c i ), which is transformed into an equivalent objective function to minimize the weighted sum of squares of the signal deviation between the fitted phase and the actual phase Step 2: Minimize the weighted sum of squares of the signal deviation between the fitted phase and the actual phase in the equivalent objective function G(w i ,a i ,b i ,c i ,λ) for w i Finding the first-order derivative and the second-order derivative, we can get the corresponding first-order derivative and second-order derivative expressions: It is obvious that the second-order derivative Greater than 0, when setting the first-order derivative When, we can optimize w i G(w i ,a i ,b i ,c i ,ρ) satisfies the minimum condition, thus achieving min{G(w i ,a i ,b i ,c i ,ρ)} holds true; it can be obtained by and We can get G(w i ,a i ,b i ,c i ,ρ) is the weight coefficient w of the main frequency feature point when it meets the minimum condition i The optimized value expression of ; Step 3: G(w i ,a i ,b i ,c i ,λ) for a i ,b i ,c i By calculating the first-order derivative and the second-order derivative respectively, we can get the corresponding first-order derivative and second-order derivative expressions: Obvious second derivative and Greater than 0, when the first-order derivative When, we can optimize a i ,b i ,c i G(w i ,a i ,b i ,c i ,ρ) satisfies the minimum condition, thus achieving min{G(w i ,a i ,b i ,c i ,ρ)} holds true; According to the first-order derivative The following set of equations can be established: make as well as Among them, 0≤m≤4, 0≤n≤2, we can know that p m ,q n >0, the system of equations can be rewritten into matrix form Can be ordered and For the elements in P, we know that P∈R n×n In the non-singular case, we can get G(w i ,a i ,b i ,c i ,ρ) when the quadratic term coefficient of the fitting relationship meets the minimum condition i , linear coefficient b i and the constant term c i The optimized value expression of ; Step 4: The weight coefficient w of the main frequency feature point can be i , quadratic coefficient a i , linear coefficient b i and the constant term c i Substitute the optimized value into the iterative process from step 4.1 to step 4.4 to generate the actual weight coefficient Value w i ', the actual value of the quadratic coefficient a i ', the actual value of the linear coefficient b i ' and the actual value of the constant term c i '; Step 5: The main frequency feature point λ generated by the iterative process in step 4 can be i The actual value of the weight coefficient w i ', the actual value of the quadratic coefficient of the fitting relationship a i ', the actual value of the linear coefficient b i ' and the actual value of the constant term c i 'It is used to detect the internal substances of the fruit h that needs to be detected. Through the relevant detection equipment, I different main frequency characteristic points λ can be obtained i The frequency domain phase signal y i,h , then The fitting relationship can be used to obtain the internal material status of fruit h In step 4, the actual value w used to generate the weight coefficient i ', the actual value of the quadratic coefficient a i ', the actual value of the linear coefficient b i ' and the actual value of the constant term c i The iterative process from step 4.1 to step 4.4 can be described as: Step 4.1: Initialization process As the initial value of the weight coefficient, the main frequency feature points λ of K sample fruits in the sample set are tested experimentally. i The frequency domain phase signal y i,k And the internal material condition x k , and then substitute the quadratic coefficient a i , linear coefficient b i and the constant term c i The optimized value expression of the quadratic term coefficient a is obtained i , linear coefficient b i and the constant term c i The initial value of , and the number of iterations n is set to 0; Step 4.2: Substitute the quadratic coefficient a i (n), linear coefficient b i (n) and the constant term c i (n) Substitute the weight coefficient w i The optimized value expression of (n) is obtained to obtain w i (n+1); Step 4.3: Set the weight coefficient w i (n+1) Substitute the quadratic term coefficient a i , linear coefficient b i and the constant term c i The optimized value expression of the quadratic term coefficient a is obtained i (n+1), linear coefficient b i (n+1) and the constant term c i (n+1), the number of iterations n is set to n+1; Step 4.4: If satisfied and Then the output is w i (n+1), a i (n+1), b i (n+1) and c i (n+1) is the actual value w of the weight coefficient i ', the actual value of the quadratic coefficient of the fitting relationship a i ', the actual value of the linear coefficient b i ' and the actual value of the constant term c i ' and end the iteration process, where △ is the parameter deviation ratio threshold, otherwise go to step 4.
2.
2. The method for detecting internal substances of fruits based on the phase characteristics of terahertz signals according to claim 1, characterized in that: In step 2, G(w i ,a i ,b i ,c i ,ρ) is the weight coefficient w of the main frequency feature point when it meets the minimum condition i The optimized value expression can be expressed as:
3. The method for detecting internal substances of fruits based on the phase characteristics of terahertz signals according to claim 1, characterized in that: In step 3, G(w i ,a i ,b i ,c i ,ρ) when the quadratic term coefficient of the fitting relationship meets the minimum condition i , linear coefficient b i and the constant term c i The optimized value expression can be expressed as:
Citation Information
Patent Citations
Method for determining content of drug components in mixture drug
CN105092513A
Terahertz time-domain spectral sparse imaging method
CN106441575A
