CN113390925B - Method for quantitatively detecting nitrogen in soil based on electrical impedance - Google Patents

Method for quantitatively detecting nitrogen in soil based on electrical impedance Download PDF

Info

Publication number
CN113390925B
CN113390925B CN202110586732.3A CN202110586732A CN113390925B CN 113390925 B CN113390925 B CN 113390925B CN 202110586732 A CN202110586732 A CN 202110586732A CN 113390925 B CN113390925 B CN 113390925B
Authority
CN
China
Prior art keywords
soil
data
impedance
interference factor
nitrogen
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.)
Active
Application number
CN202110586732.3A
Other languages
Chinese (zh)
Other versions
CN113390925A (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.)
China Agricultural University
Original Assignee
China Agricultural University
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 China Agricultural University filed Critical China Agricultural University
Priority to CN202110586732.3A priority Critical patent/CN113390925B/en
Publication of CN113390925A publication Critical patent/CN113390925A/en
Application granted granted Critical
Publication of CN113390925B publication Critical patent/CN113390925B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N27/00Investigating or analysing materials by the use of electric, electrochemical, or magnetic means
    • G01N27/02Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating impedance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P60/00Technologies relating to agriculture, livestock or agroalimentary industries
    • Y02P60/20Reduction of greenhouse gas [GHG] emissions in agriculture, e.g. CO2
    • Y02P60/21Dinitrogen oxide [N2O], e.g. using aquaponics, hydroponics or efficiency measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Electrochemistry (AREA)
  • Health & Medical Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Or Analyzing Materials By The Use Of Electric Means (AREA)

Abstract

The invention provides a method for quantitatively detecting soil nitrogen based on electrical impedance. The method comprises the following steps: pretreating the obtained soil to obtain soil samples with different nitrogen contents; detecting and analyzing a plurality of groups of soil samples to obtain total nitrogen content and impedance index data of a plurality of groups of soil and dominant interference factor data influencing nitrogen content detection in the soil; classifying the soil impedance index data and the dominant interference factor data; respectively establishing a response function between soil impedance index data, dominant interference factor data and detected soil nitrogen content data aiming at each classified data; and detecting the nitrogen content in the soil based on the response function.

Description

Method for quantitatively detecting nitrogen in soil based on electrical impedance
Technical Field
The invention relates to the technical field of soil component detection, in particular to a method for quantitatively detecting soil nitrogen based on electrical impedance.
Background
The chemical fertilizer can directly provide nutrient elements necessary for crops, meets the growth and development requirements of the crops, and directly influences the crop yield, the producer income and the soil environment quality by the input amount and the utilization rate. The selective absorption of nutrient elements by crops causes the accumulation of redundant soil nutrients year by year, so that the soil nutrient structure is damaged, and the soil is difficult to self-regulate in the past and even loses the production capacity in serious cases. Therefore, variable fertilization is carried out based on the spatial variability of soil nutrients, the timely and quantity-based supply of crop nutrients is realized, and a precise fertilization strategy is implemented, so that the method is an important measure for realizing the clean production and sustainable development of agriculture. In order to realize the automatic and intelligent development of accurate fertilization, quantitative detection of soil nutrients is an important precondition, and the quantitative detection of soil nutrients also becomes the most important bottleneck for limiting the development of accurate fertilization.
Although the soil nutrient determination scheme is researched and designed by using the principles of electrochemistry, photoelectric color separation, spectrum and the like in the prior art to realize effective determination of soil nutrients, the existing soil nutrient determination technology generally depends on more or less professional experimental equipment and experimenters, has higher requirements on experimental environment, and needs a certain time to roll from determination to feedback to farmers, so that the soil nutrient determination technology is difficult to popularize and apply in actual production.
Disclosure of Invention
The invention provides a method for quantitatively detecting soil nitrogen based on electrical impedance, which aims to judge and predict nitrogen component information contained in soil, so that farmers can effectively control crop production based on soil environment information, and the practical requirements on agricultural modernization and sustainable development in China are met.
Specifically, the embodiment of the invention provides the following technical scheme:
in a first aspect, embodiments of the present invention provide a method for quantitatively detecting soil nitrogen based on electrical impedance, the method comprising:
pretreating the obtained soil to obtain soil samples with different nitrogen contents;
detecting and analyzing a plurality of groups of soil samples to obtain a plurality of groups of soil total nitrogen content, impedance index data and dominant interference factor data influencing the detection of the nitrogen content in the soil;
classifying the soil impedance index data and the dominant disturbance factor data;
respectively establishing a response function between the soil impedance index data, the dominant interference factor data and the detected soil nitrogen content data aiming at each classified data; and
and detecting the nitrogen content in the soil based on the response function.
Further, the method further comprises:
the dominant disturbance factor data includes the soil moisture content and an excitation frequency.
Further, the method also includes:
the classifying the soil impedance indicator data and the dominant disturbance factor data includes:
normalizing the detected soil impedance index data and the dominant interference factor data to be used as initial input data;
randomly selecting initial clustering centroid points;
respectively calculating Euclidean distances between the initial input data and the initial clustering mass point, and dividing the initial input data into the category closest to the Euclidean distance of the initial clustering mass point.
Further, the method further comprises:
calculating the center of each category;
defining a distortion function by using the Euclidean distance;
and after the distortion function reaches the minimum value or training reaches an iteration threshold value, obtaining classified k groups of data and a final clustering centroid point, wherein k is a positive integer smaller than n, and n is a positive integer.
Further, the method further comprises:
respectively calculating clustering results of the k clustering cluster numbers;
calculating the sum of the squares of errors between all samples corresponding to the clustering cluster number k and the centroid point;
and determining the cluster number k corresponding to the data inflection point as the final clustering cluster number and the final clustering result of the data.
Further, the method further comprises:
the separately establishing response functions between the soil impedance indicator data, the dominant interference factor data, and the detected soil nitrogen content data for each classified type of data includes:
taking the classified k groups of data as training samples;
and introducing an insensitive loss function, and obtaining the response function based on the insensitive loss function and the training sample.
Further, the method further comprises:
the soil impedance index data includes an impedance mode value and a phase angle.
Further, the method further comprises:
said detecting and analyzing a plurality of sets of soil samples and said detecting nitrogen content in soil based on said response function further comprises: and detecting the soil sample by adopting at least one detection mode of an electrical impedance detection front end, wherein the at least one electrical impedance detection front end comprises a four-end side-by-side type front end, a four-end double-row type front end, a four-end single-pin type front end and a four-end surrounding type front end.
Further, the method further comprises:
the method is characterized in that the obtained soil is pretreated to obtain soil samples with different nitrogen contents, and the method comprises the following steps:
sampling typical soil of an area to be detected, and removing impurities;
screening the sampled soil to serve as a basic soil sample; and
and configuring nitrogen with different contents for the foundation soil samples to serve as a plurality of groups of soil samples.
According to the technical scheme, the method for quantitatively detecting the soil nitrogen based on the electrical impedance provided by the embodiment of the invention detects electrical parameters such as the electrical impedance and the phase angle of a soil sample through the electrical impedance technology, establishes a response function between the soil electrical impedance parameter and the soil nitrogen content by combining dominant interference factor data such as the soil water content and the power supply excitation frequency, and further judges and predicts the component information of the soil nitrogen content, so that a farmer can effectively control crop production based on soil environment information, and the practical requirements on agricultural modernization and sustainable development in China are met.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for quantitative detection of soil nitrogen based on electrical impedance according to an embodiment of the present invention; and
fig. 2 is a flowchart illustrating the establishment of a response function in the method for quantitatively detecting nitrogen in soil based on electrical impedance according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Although various terms or phrases used herein have the same general meaning as commonly understood by one of ordinary skill in the art, it is to be understood that the invention is not limited to the specific term or phrase herein, but is to be accorded a full, scope, meaning consistent with the definition of such term or phrase herein. To the extent that the terms and phrases referred to herein have meanings that are not inconsistent with known meanings, the meaning of the term in question applies; and have the meaning commonly understood by a person of ordinary skill in the art if not defined herein.
In the prior art, effective determination of soil nutrients can be realized by researching and designing soil nutrient determination schemes by using the principles of electrochemistry, photoelectric color separation, spectrum and the like, but generally, the existing soil nutrient determination technology depends on professional experimental equipment and experimenters more or less, has higher requirements on experimental environment, needs a certain time from determination to feedback to farmers, and is difficult to popularize and apply in actual production.
In view of the foregoing, in a first aspect, an embodiment of the present invention provides a method for quantitatively detecting soil nitrogen based on electrical impedance, which aims to overcome the problems in the prior art.
The method provided by one embodiment of the invention is a method for quantitatively detecting the nitrogen in the soil based on the electrical impedance, wherein the electrical impedance detection is used as a common sample physical property detection method and applied to numerous research results and market applications. The soil contains mineral substances, water, air, organic substances and living organisms, and is a mixture of gas, liquid and solid phases. Due to the existence of moisture, mineral substances in the soil are dissolved into the moisture to form electrolytic ions which can conduct electricity, so that the soil can be regarded as an electrical impedance device with the characteristics of resistance, inductance and capacitance. Among many nutrients, nitrogen is an indispensable macroelement in the growth and development process of crops, and the nitrogen is used and transformed more frequently in actual production. When the fertilizer application operation is carried out, the applied nitrogen fertilizer and water can form nitrite nitrogen, nitrate nitrogen, ammonia and ammonium ions to enter the soil, and the increase of the nitrogen application amount can form the increase of the nitrogen content of the soil, which can cause NH of the soil 4 + 、NO 3 - 、NO 2 - The increase of the concentration of the nitrogen-containing ions enables the increase of the concentration of the conductive ions of the soil in the aspect of electrical characteristics to correspondingly change the obstruction and the hysteresis effect generated on the current, so that the change of the actual electrical impedance detection value is caused. The basic theory is as follows:
the magnitude of the soil resistivity depends primarily on the composition and moisture content of the soil. The composition of the conductive ions determines the concentration of the conductive ions contained in the conductive ions. Assuming a concentration of conductive ions in the soil of
Figure BDA0003087857150000052
The water content is theta, and the soil resistivity rho (resistivity) is a function of the concentration eta of the conductive ions and the water content theta:
Figure BDA0003087857150000051
wherein, C 1 、C 2 Is a constant.
According to equation (1), the soil resistivity will vary depending on the soil composition and water content. Under the condition of a constant temperature, the resistivity and the resistance have the following relationship:
Figure BDA0003087857150000061
wherein R represents the resistance, l is the length of the material, and S is the cross-sectional area of the material.
When the soil is regarded as an electrical impedance device with the characteristics of resistance, inductance and capacitance, the electrical impedance value is defined as follows:
Z=R+J(X C -X L ) Formula (3)
In addition, the air conditioner is provided with a fan,
Figure BDA0003087857150000062
wherein Z represents electrical impedance, R represents resistance, X C Denotes capacitive reactance, X L Representing the inductive reactance, J representing the imaginary sign of the electrical impedance, f representing the current source excitation frequency, C the capacitance and L the inductance.
The following relations exist among the electrical impedance value of the soil, the water content of the soil and the nutrient content of the soil by integrating the formulas (1), (2), (3) and (4):
Figure BDA0003087857150000063
for the same facility soil sample, f 1 、f 2 L, S, C, L are constants, so the above equation can be simplified as:
Figure BDA0003087857150000064
wherein, C 3 ,C 4 ,C 5 Are all constants.
As can be seen from equation (6), the soil electricity is affectedThe main influence factor of the magnitude of the impedance value includes the concentration of conductive ions in the soil
Figure BDA0003087857150000065
Soil moisture content (theta) and current source excitation frequency (f).
The concentration of conductive ions in soil is mainly influenced by various nutrient elements in the soil, but the soil has the limit of saturated concentration of the conductive ions, the change of the electrical impedance of the soil caused by the concentration difference of the conductive ions is not only the change of the concentration of nitrogen-containing ions caused by the difference of nitrogen application amount, but also a plurality of other conductive ions exist in the soil, and when other fertilizers such as phosphate fertilizers, potash fertilizers and the like are applied, the change of partial ion concentration can also be caused. Therefore, specific variable control and application-specific limiting conditions are required for detecting soil nitrogen by using an electrical impedance method. Under certain conditions, the electrical impedance characteristics of the soil have certain correlation with the content of nitrogen in the soil.
The method for detecting the soil nitrogen element quantitatively based on the electrical impedance is described in the following with reference to fig. 1.
Fig. 1 is a flowchart of a method for quantitatively detecting nitrogen in soil based on electrical impedance according to an embodiment of the present invention.
In this embodiment, it should be noted that the method for quantitatively detecting soil nitrogen based on electrical impedance may include the following steps:
s1: pretreating the obtained soil to obtain soil samples with different nitrogen contents;
s2: detecting and analyzing a plurality of groups of soil samples to obtain a plurality of groups of soil total nitrogen content, impedance index data and dominant interference factor data influencing the detection of the nitrogen content in the soil;
s3: classifying the soil impedance index data and the leading interference factor data;
s4: respectively establishing a response function between soil impedance index data, dominant interference factor data and detected soil nitrogen content data aiming at each classified data; and
s5: and detecting the content of nitrogen in the soil based on the response function.
In this embodiment, it should be noted that the method may further include: pre-treating the obtained soil to obtain a soil sample S1, comprising: sampling typical soil of an area to be detected, and removing impurities; screening the sampled soil to serve as a basic soil sample; and configuring nitrogen with different contents for the basic soil samples to serve as a plurality of groups of soil samples.
Specifically, the typical soil of the area to be measured is sampled, the sundries such as stubble, vegetable leaves and stones covered on the ground surface are removed, and 30kg of original soil is taken according to the depth of 0mm to 150mm from the ground surface. Taking the retrieved original soil as a foundation soil sample after the retrieved original soil is screened by a 10-mesh soil screen; in order to prepare soil samples with different nitrogen content levels, the invention selects urea with 46.4 percent of nitrogen content as a test nitrogen fertilizer. Taking 15kg of basic soil samples, averagely dividing into 20 parts, then respectively adding urea (nitrogen fertilizer) with different masses into each soil sample according to the nitrogen content gradient of 0.1g/kg, fully and uniformly mixing, then putting the mixture into a cylindrical glass container with the diameter of 100mm and the height of 120mm to be used as a single soil sample, standing for 72 hours, and then taking out 50g of the mixture from each soil sample to detect the total nitrogen content and the water content of the soil to obtain the basic data of the soil sample.
In this embodiment, it should be noted that the method may further include: detecting and analyzing the plurality of sets of soil samples S2 and detecting the nitrogen content in the soil based on the response function S5 further includes: the method comprises the steps of detecting a soil sample by adopting at least one detection mode of an electrical impedance detection front end, wherein the at least one electrical impedance detection front end comprises a four-end side-by-side type front end, a four-end double-row type front end, a four-end single-needle type front end and a four-end surrounding type front end.
Specifically, the invention utilizes an LCR TH2829 digital bridge tester to complete the measurement of the soil impedance index, and in order to obtain stable and reliable soil impedance information, the invention designs the impedance detection front end according to the four-end detection principle respectively so as to determine the specific measurement effect of the detection front ends in different forms and complete the acquisition of corresponding impedance measurement interference factor data in a matching way.
More specifically, red copper probes with the diameter of 2mm and the total length of 100mm are adopted for the four-end side-by-side type and the four-end double-row type front ends, and the distance between the probes is set to be 20 mm; the four-end single-needle type detection front end adopts a red copper ring with the inner diameter of 12mm, the thickness of 0.3mm and the length of 10 mm; four ends surround formula and detect the front end, and its center is diameter 2mm, and length 100 mm's red copper probe, and the outside encircles the copper ring external diameter and is 20mm respectively, 40mm, 60mm, and copper ring thickness is 0.5mm, and total length is 100 mm. However, the embodiments of the present invention are not limited thereto, and those skilled in the art can select other different detection modes according to more practical needs without departing from the scope and spirit of the present invention.
More specifically, the respective measuring elements of four detection front ends, such as four-end side-by-side type, four-end double-row type, four-end single-needle type and four-end surrounding type, are connected and supported by a 3D printed resin material.
In this embodiment, it should be noted that the method may further include: the interference factor data comprises soil environment temperature, soil particle size, soil moisture content, soil pH value, excitation duration, excitation frequency and detection front end.
However, the embodiments of the present invention are not limited thereto, and those skilled in the art may select more different interference factor data as necessary without departing from the scope and spirit of the present invention. For example, the interference factor data is divided into impedance instrument detection parameter interference factor data and soil conductive environment interference factor data, wherein the impedance instrument detection condition interference factor data comprises excitation duration, excitation frequency and a detection front end, the soil conductive condition interference factor data comprises soil environment temperature, soil particle size, soil moisture content and soil pH value, and the excitation frequency and the soil moisture content are determined as leading interference factor data from two aspects of impedance instrument detection parameters and soil conductive environment.
In this embodiment, it should be noted that the method may further include: the electrical impedance index data includes an impedance modulus value and a phase angle.
Specifically, the process of measuring the electrical impedance parameters of the soil sample is influenced by a plurality of factors, and can be divided into two aspects of impedance instrument detection parameters and soil conductive environment according to the measurement principle, wherein the impedance instrument detection parameters mainly comprise excitation time, excitation frequency, the form (material, diameter and distance) of a detection front end, the soil penetration length of a probe and the like, and the soil conductive environment mainly comprises the factors of soil environment temperature, soil particle size, soil water content and the like. The experimental conditions of the interference factors for measuring the electrical impedance parameters of the soil sample mainly considered by the invention are shown in the table 1.
Figure BDA0003087857150000091
TABLE 1
For example, after the soil sample preparation is completed, the impedance modulus (Z) of the soil sample is completed by using different impedance detection front ends and an LCR TH2829 digital bridge tester s ) And phase angle (θ).
Specifically, in order to quantify the rule of influence of the representation of the excitation time on the soil impedance measured value, the invention introduces the relative variation of the soil impedance measurement index data:
Figure BDA0003087857150000101
in the formula, δ represents the relative change amount of the soil impedance index, x represents the measurement parameter value before the change, and x' represents the parameter value after the change.
The soil impedance modulus Z can be obtained by combining the formula (7) s And a calculation formula of the relative variation of the phase angle theta, which are respectively as follows:
Figure BDA0003087857150000102
Figure BDA0003087857150000103
wherein, in the formula, δ z And delta θ Passing same detection front end respectively representing adjacent time nodesMeasured soil impedance modulus Z s And relative change amount, Z, of two index data of phase angle theta st And theta t Average impedance mode values and average phase angle values obtained for a single soil sample at the time node, where t is the time node value, and t is 0s, 20s, 40s.
Further, the invention converts the impedance modulus value Z s And the absolute relative variation | delta | of the phase angle theta is less than 0.5 percent and is used as a critical value of the soil impedance index reaching a stable state, namely the measured value of the soil sample, and the corresponding time node is the measuring excitation time length.
The invention adopts Coefficient of Variation (CV) to express the stability of different detection front ends when measuring the soil impedance index, so as to determine the suitable impedance detection front end, and the calculation formula of the Coefficient of Variation is as follows:
Figure BDA0003087857150000104
in the formula, SD represents a sample standard deviation, and MEAN represents a sample average value.
The invention selects the impedance modulus Z with obvious change s The smaller the variation coefficient is, the better the stability of the index data is, and the data set with the minimum variation coefficient corresponds to the proper impedance detection front end.
A flow chart for establishing a response function in the method for quantitatively detecting soil nitrogen based on electrical impedance is described below with reference to fig. 2.
Fig. 2 is a flowchart illustrating the establishment of a response function in the method for quantitatively detecting nitrogen in soil based on electrical impedance according to an embodiment of the present invention.
Research shows that for soil samples with the same nitrogen content, the soil electrical impedance measured values obtained under different dominant interference factors have significant difference, even the impedance module values of the soil electrical impedance measured values are possibly not in an order of magnitude range, which is also a main reason for limiting the application of soil electrical impedance characteristics to quantitative detection of soil nitrogen, and the stability and the precision of a soil nitrogen response value are seriously influenced by the existence of interference factors. In order to solve the problem, the invention firstly classifies experimental data and then trains corresponding detection models respectively, so as to obtain the soil nitrogen quantitative detection method.
In this embodiment, it should be noted that the method may further include: classifying the soil impedance index data and the dominant disturbance factor data S3 includes: normalizing the detected soil impedance index data and the dominant interference factor data to be used as initial input data; respectively calculating clustering results of the k clustering cluster numbers; randomly selecting initial clustering centroid points; and respectively calculating Euclidean distances between the initial input data and the initial clustering mass point, and classifying the initial input data into a category closest to the Euclidean distance of the initial clustering mass point.
Specifically, as shown in fig. 2, in the first step, n groups of detected soil impedance index data (impedance modulus and phase angle) and dominant interference factor data (moisture content and excitation frequency) are normalized and then taken as initial input data D ═ x (1) ;x (2) ;...;x (i) ;...;x (n) ]Wherein each x (i) ∈R 4
Specifically, as shown in fig. 2, in the second step, k initial cluster centroid points μ are randomly selected 1 ,...,μ j ,...,μ k ,μ j ∈R 4
For each set of input data x (i) Separately calculate its and each initial cluster particle mu j And to classify it into the class closest to it:
Figure BDA0003087857150000111
wherein, c (i) Representing the ith input data x (i) The class closest to the k classes, c (i) 1, 2, k; arg is a marker symbol and arg min is used to indicate that the sample index belongs to the class represented by the closest centroid.
In this embodiment, it should be noted that the method may further include: classifying S3 the soil impedance indicator data and the interference factor data may further include: calculating the center of each category; defining a distortion function by using Euclidean distance; and after the distortion function reaches the minimum value or the training reaches an iteration threshold value, obtaining classified k groups of data and a final clustering centroid point, wherein k is a positive integer smaller than n, and n is a positive integer.
Specifically, as shown in FIG. 2, the third step, for each class μ j Recalculating the center of the class:
Figure BDA0003087857150000121
wherein, 1{ c (i) J represents when c (i) When j is equal to 1, otherwise it is 0.
Specifically, as shown in fig. 2, in the fourth step, the distortion function is defined by using the euclidean distance:
Figure BDA0003087857150000122
wherein r is ij Representing input data x (i) Is classified into mu j Is 1 when it is used, otherwise is 0.
Specifically, as shown in fig. 2, in the fifth step, the third step and the fourth step are iterated repeatedly until the distortion function J reaches the minimum value or the training reaches the iteration threshold, and the classification is finished to obtain k sets of input data D ═ D { D ═ D 1 ,D 2 ,...,D k And the final cluster centroid μ ═ μ 1 ,...,μ j ,...,μ k In which D is k ={xk (1) ,x k (2) ,...,x k (t) And t represents the number of data grouped into the kth group, wherein k is a positive integer smaller than n, and n is a positive integer.
In this embodiment, it should be noted that the method may further include: classifying S3 the soil impedance indicator data and the interference factor data may further include: respectively calculating clustering results of the k clustering cluster numbers; calculating the sum of squares of errors between all samples corresponding to the clustering cluster number k and the centroid point; and determining the cluster number k corresponding to the data inflection point as the final cluster number and the final clustering result.
Specifically, as shown in fig. 2, in the sixth step, the sum of squares of errors sse (sum of the squared errors) between all samples corresponding to the cluster number k and the cluster centroid point is calculated, and the formula is:
Figure BDA0003087857150000132
wherein, C m Represents the mth cluster; x is the number of m (i) Is C m The sample point of (1); mu.s m Is C m Center of mass (C) m Mean of all samples) and SSE is the clustering error of all samples to characterize the clustering result.
Specifically, as shown in fig. 2, the seventh step is to repeat the second to sixth steps, and calculate the clustering errors SSE of the k clustering numbers respectively k And k is 1, 2,.. and n, and the cluster number k corresponding to the data inflection point is determined as the final cluster number of the data, and the final cluster result is obtained.
In this embodiment, it should be noted that the method may further include: respectively establishing a response function S4 among soil impedance index data, interference factor data and detected soil nitrogen content data for each classified data, wherein the response function S4 comprises the following steps: taking the classified k groups of data as training samples; and introducing an insensitive loss function, and obtaining the response function based on the insensitive loss function and the training sample. For example, after the classification of experimental data is completed, for each set of data D k A response method among the soil impedance index, the dominant interference factor and the soil total nitrogen content is established according to the following processes.
Specifically, the input data D is first input k Total nitrogen content y of soil sample corresponding to the total nitrogen content k Form training sample T k ={(x k (1) ,y k (1) ,(x k (2) ,y k (2) ),...,(x k (t) ,y k (t) )},x k ∈R 4 ,y k ∈R。
In particular, an insensitive loss function e is introduced k If the soil nitrogen content predicted value f (x) k ) And the sample value y k Gap | z between k |=|f(x k )-y k Less than a given e k Then it is considered lossless (although the predicted and observed values may not be exactly equal).
Specifically, an objective function is defined:
Figure BDA0003087857150000131
wherein w k =(w k1 ;w k2 ;...;w kd ) The direction of the separating hyperplane is determined as a normal vector, b k Is a constant number, C k For the regularization constant,/ Is e k Is a loss-insensitive function of f (x) k ) Is a predicted value of the nitrogen content of the soil, y k And (4) actually measuring the sample value of the nitrogen content of the soil.
Figure BDA0003087857150000141
Wherein z is k For the soil nitrogen content prediction value f (x) k ) And the measured sample value y k The difference between z k =f(x k )-y k
Solving the problem by a Lagrange multiplier method to obtain an objective function under the condition of linear regression as follows:
Figure BDA0003087857150000142
wherein
Figure BDA0003087857150000143
And a i For the lagrange multiplier to be solved,the following equation (17) can be obtained:
Figure BDA0003087857150000144
the invention aims to select a plurality of alpha satisfying the condition 0 < alpha i <C k Solving for b k And then, taking an average value to enhance the robustness of the method, and considering a feature mapping form, then:
Figure BDA0003087857150000145
wherein
Figure BDA0003087857150000146
Is a low-dimensional to high-dimensional mapping. To avoid solving the mapping
Figure BDA0003087857150000147
Introducing a kernel function k (x, y) which satisfies
Figure BDA0003087857150000148
The response objective function between the soil impedance indicator, the dominant interference factor and the total nitrogen content of the soil can be expressed as:
Figure BDA0003087857150000149
for the nonlinear regression problem, by nonlinear transformation
Figure BDA00030878571500001410
Transforming the sample space to some high dimensional feature space, constructing a linear model in the space, and the kernel function can effectively avoid solving the nonlinear transformation
Figure BDA00030878571500001411
To a problem of (a). By selecting different kernel functions, the sample points can be mapped to feature spaces with different dimensions, and corresponding feature spaces can be obtainedAnd (4) regression modeling. The invention adopts a Gaussian kernel function to complete the feature mapping from low dimension to high dimension of a training sample:
Figure BDA00030878571500001412
specifically, through the above calculation process, k sets of response functions f (x) between the soil impedance, the dominant influence factor and the total nitrogen content of the soil can be obtained respectively k ) According to the response function, the soil total nitrogen content predicted value of the corresponding soil sample can be obtained
Figure BDA0003087857150000154
The root mean square error RMSE can then be calculated:
Figure BDA0003087857150000151
because the selection of the initial clustering mass center in each classification can influence the final clustering result, in order to obtain a more reasonable prediction result, the invention repeatedly classifies and trains the data for 20 times, calculates the RMSE of the predicted value and the actual value of the total nitrogen content of the soil, and then classifies the clustering mass center mu with the minimum RMSE in the 20 times of training min ={μ 1 ,...,μ j ,...,μ k And (5) taking the corresponding response function as a final soil nitrogen quantitative detection method.
Further, when the obtained response function is used for soil nitrogen content detection and verification, it is first required to judge which type of input data the verification data belongs to, and then select the corresponding response function f (x) according to the type of the verification data k ) Thereby obtaining the predicted value of the nitrogen content in the soil. The verification process is as follows:
specifically, the verification data T is input e =[x e (1) ;x e (2) ;...;x e (i) ;...;x e (s) ],x e (i) ∈R m ,Y e =[y e (1) ;y e (2) ;...;y e (i) ;...;y e (s) ]Wherein y is e E is R; verifying the input data x for each group e (i) Calculating the particle μ of each final cluster according to equation (14) j The Euclidean distance of (1) to obtain the type of mu closest to the Euclidean distance k (ii) a X is to be e (i) Response function f (x) substituted into the class to which it belongs k ) To obtain the corresponding predicted value
Figure BDA0003087857150000152
Predicting the nitrogen content of soil
Figure BDA0003087857150000153
With the actual value y e Comparative analyses were performed to verify the applicability of the method provided by the examples of the present invention.
Moreover, in the present invention, relational terms such as first and second, and the like may be used solely to distinguish one aspect or operation from another aspect or operation without necessarily requiring or implying any actual such relationship or order between such aspects or operations. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element described by the phrase "comprising a. -" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Furthermore, in the present disclosure, reference to the description of the terms "embodiment," "this embodiment," "yet another embodiment," or the like, means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (4)

1. A method for quantitatively detecting soil nitrogen based on electrical impedance is characterized by comprising the following steps:
pretreating the obtained soil to obtain soil samples with different nitrogen contents, wherein the soil samples comprise:
sampling typical soil of an area to be detected, and removing impurities;
screening the sampled soil by using a 10-mesh soil screen to serve as a basic soil sample; and
configuring nitrogen with different contents for the foundation soil samples to serve as a plurality of groups of soil samples;
detecting and analyzing a plurality of groups of soil samples to obtain a plurality of groups of dominant interference factor data in the interference factor data which influence the detection of the total nitrogen content of the soil, the soil impedance index data and the nitrogen content in the soil;
classifying the soil impedance index data and the dominant interference factor data, wherein the soil impedance index data comprises an impedance mode value and a phase angle, the dominant interference factor data comprises the soil moisture content and an excitation frequency, and the interference factor data is divided into impedance instrument detection parameter interference factor data and soil conductive environment interference factor data, wherein the impedance instrument detection condition interference factor data comprises an excitation time length, the excitation frequency and a detection front end, the soil conductive condition interference factor data comprises soil environment temperature, soil particle size, the soil moisture content and a soil pH value, wherein the excitation time length is 0-600s, the excitation frequency is 0.05-200kHz, the detection front end comprises four-end side-by-side type, four-end double-row type, four-end single-needle type and four-end surrounding type front ends, and the soil particle size is less than 2mm, the environment temperature of the soil is 10-25 ℃, the pH value of the soil is 7.0, and the water content of the soil is 0-20%;
respectively establishing response functions among the soil impedance index data, the dominant interference factor data and the detected soil nitrogen content data aiming at each classified data, wherein the response functions comprise:
taking the classified k groups of data as training samples;
introducing an insensitive loss function, and obtaining the response function based on the insensitive loss function, the Gaussian kernel function and the training sample; and
and detecting the nitrogen content in the soil based on the response function and the final clustering centroid point.
2. The method for the quantitative detection of soil nitrogen based on electrical impedance as claimed in claim 1, wherein the classifying the soil impedance index data and the interference factor data comprises:
normalizing the detected soil impedance index data and the interference factor data to be used as initial input data;
randomly selecting initial clustering centroid points;
respectively calculating Euclidean distances between the initial input data and the initial clustering mass point, and dividing the initial input data into the category closest to the Euclidean distance of the initial clustering mass point.
3. The method for quantitative soil nitrogen detection based on electrical impedance of claim 2, wherein the classifying the soil impedance indicator data and the interference factor data further comprises:
calculating the center of each category;
defining a distortion function using the euclidean distance;
and after the distortion function reaches the minimum value or training reaches an iteration threshold value, obtaining classified k groups of data and a final clustering centroid point, wherein k is a positive integer smaller than n, and n is a positive integer.
4. The method for the quantitative detection of soil nitrogen based on electrical impedance as claimed in claim 3, further comprising:
respectively calculating clustering results of the k clustering cluster numbers;
calculating the sum of squares of errors between all samples corresponding to the clustering cluster number k and the centroid point;
and determining a cluster number k corresponding to the data inflection point as a final clustering cluster number and a final clustering result.
CN202110586732.3A 2021-05-27 2021-05-27 Method for quantitatively detecting nitrogen in soil based on electrical impedance Active CN113390925B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110586732.3A CN113390925B (en) 2021-05-27 2021-05-27 Method for quantitatively detecting nitrogen in soil based on electrical impedance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110586732.3A CN113390925B (en) 2021-05-27 2021-05-27 Method for quantitatively detecting nitrogen in soil based on electrical impedance

Publications (2)

Publication Number Publication Date
CN113390925A CN113390925A (en) 2021-09-14
CN113390925B true CN113390925B (en) 2022-09-23

Family

ID=77619289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110586732.3A Active CN113390925B (en) 2021-05-27 2021-05-27 Method for quantitatively detecting nitrogen in soil based on electrical impedance

Country Status (1)

Country Link
CN (1) CN113390925B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103592338A (en) * 2013-11-20 2014-02-19 西北农林科技大学 Tube-pin-type soil moisture content detection method and device based on frequency domain reflectometry
WO2017219492A1 (en) * 2016-06-24 2017-12-28 广东森维绿联科技有限公司 Intelligent detection device for soil moisture and nutrition changes

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7671336B2 (en) * 2005-09-14 2010-03-02 The Regents Of The University Of California Method for soil content prediction based on a limited number of mid-infrared absorbances
CN102663754B (en) * 2012-04-17 2014-12-10 北京博研新创数码科技有限公司 Image matching calculation method based on regional Gaussian weighting
CN107271455B (en) * 2016-04-08 2020-03-06 上海海洋大学 Method and device for measuring salt content of water in soil by applying low-frequency microwave band
CN109871412A (en) * 2018-12-26 2019-06-11 航天科工广信智能技术有限公司 Lane flow analysis method based on K-Means cluster
CN109885683B (en) * 2019-01-29 2022-12-02 桂林远望智能通信科技有限公司 Method for generating text abstract based on K-means model and neural network model
CN109978270A (en) * 2019-03-29 2019-07-05 大连海事大学 A kind of container ship flight number vanning amount prediction technique
CN111257374B (en) * 2020-02-18 2020-12-22 中国农业大学 Soil water content and nitrogen content monitoring method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103592338A (en) * 2013-11-20 2014-02-19 西北农林科技大学 Tube-pin-type soil moisture content detection method and device based on frequency domain reflectometry
WO2017219492A1 (en) * 2016-06-24 2017-12-28 广东森维绿联科技有限公司 Intelligent detection device for soil moisture and nutrition changes

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
A Review of Methods for Sensing the Nitrogen Status in Plants Advantages, Disadvantages and Recent Advances;Rafael F.;《Sensors》;20130816;第13卷;第823-843页 *
Electrical impedance phase angle as an indicator of plant root stress;Imre Cseresny;《BIOSYSTEMS ENGINEERING》;20180531;第169卷;第226-232页 *
多光谱技术在土壤成分含量检测中的研究进展;李鑫星;《光谱学与光谱分析》;20200731;第40卷(第7期);第2042-2047页 *
盐分对土壤电阻率的影响研究;张润霞等;《干旱地区农业研究》;20150310(第02期);第208-210页 *

Also Published As

Publication number Publication date
CN113390925A (en) 2021-09-14

Similar Documents

Publication Publication Date Title
CN103630528B (en) A kind of method utilizing constituent content discriminating tea-leaf producing area in tealeaves
Huang et al. Improved generalization of spectral models associated with Vis-NIR spectroscopy for determining the moisture content of different tea leaves
CN105445229B (en) Wheat spring nitrogen fertilizer applying method based on nitrogen balance spectroscopic methodology and its construction method for chasing after nitrogen quantity model
CN108181263B (en) Tobacco leaf position feature extraction and discrimination method based on near infrared spectrum
CN104820873A (en) Fresh water acute standard prediction method based on metal quantitative structure-activity relationship
CN103884661A (en) Soil total nitrogen real-time detection method based on soil visible-near infrared spectrum library
CN103048339B (en) Soil moisture detection method and soil moist detection device
CN106560698A (en) Identification method for producing area of plant based on multiple detection technologies
CN104596957A (en) Estimation method for content of copper in soil on basis of visible-light near-infrared spectrum technology
Shen et al. Determination of the geographic origin of rice by element fingerprints and correlation analyses with the soil of origin
CN106560697A (en) Method for identifying producing area of Wuyi rock tea through combination of near infrared spectroscopy and trace element detection
CN105843870B (en) The analysis method and its application of repeatability and reproducibility
CN106560700A (en) Machine learning method for identifying origin of Wuyi rock tea automatically
CN113435707B (en) Soil testing formula fertilization method based on deep learning and weighting multi-factor evaluation
CN103822886A (en) Analysis detection of biological humic acid and carbon ratio determination method
CN106560699A (en) Combined detection method used for identification of producing area of Wuyi rock tea
CN109060771B (en) Consensus model construction method based on different characteristic sets of spectrum
CN113390925B (en) Method for quantitatively detecting nitrogen in soil based on electrical impedance
CN112651173B (en) Agricultural product quality nondestructive testing method based on cross-domain spectral information and generalizable system
CN103390103A (en) Melt index online detection method based on subspace independent component regression model
CN113670913A (en) Construction method for inverting hyperspectral vegetation index by using nitrogen content of rice
CN109211814B (en) It is a kind of to be set a song to music the soil profile kind identification methods of face partition characteristics based on three-dimensional light
Wu et al. Determining farming methods and geographical origin of chinese rice using NIR combined with chemometrics methods
CN108169162B (en) Rapid evaluation method for soil fertility level of tea garden
Cui et al. Geographical traceability of soybean based on elemental fingerprinting and multivariate analysis

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