Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
SYSTEM FOR MONITORING AND CONTROLLING AMMONIUM OR AMMONIA CONCENTRATION IN SOIL AND WATER
Document Type and Number:
WIPO Patent Application WO/2024/052897
Kind Code:
A1
Abstract:
A system for optimizing fertilization or neutralization agents in a soil-based site, or optimizing fish feed in a water source of aquaculture site, while reducing nitrogen contamination, comprising: (a) at least a partially transparent flow cell containing a water solution from the soil or the water source; (b) a light source emitting the flow cell; (c) a photodetector receiving said emitted light passing through the water solution contained within the flow cell and conveying a signal reflecting the intensity of the received signal to a spectrum analyzer and processing unit; (d) said spectrum analyzer and processing unit configured to determine ammonium or ammonia concentration within the water solution based on a difference between the emitted light and said light received at the photodetector in a frequency spectrum within the NIR spectrum range; and (e) a regulation unit receiving said determined ammonium or ammonia concentration and regulating amount and rate of fertilizer or neutralizing agent input to the soil at the soil-based site or fish feed to the water source at the aquaculture in a tendency to reduce the ammonium or ammonia concentration in the soil or aquaculture, respectively.

Inventors:
ARNON SHLOMI (IL)
DAHAN OFER (IL)
YUPITER ROTEM (IL)
YESHNO ELAD (IL)
Application Number:
PCT/IL2023/050936
Publication Date:
March 14, 2024
Filing Date:
August 31, 2023
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
B G NEGEV TECHNOLOGIES AND APPLICATIONS LTD AT BEN GURION UNIV (IL)
International Classes:
A01C23/00; A01C23/04; A01G25/16; G01N21/33; G01N21/64; G01N27/12; G01N33/00
Foreign References:
US20220229036A12022-07-21
CN207516297U2018-06-19
CN111443744A2020-07-24
US20210080385A12021-03-18
US20160168042A12016-06-16
Attorney, Agent or Firm:
PYERNIK, Moshe et al. (IL)
Download PDF:
Claims:
Claims

1 . A system for optimizing fertili zation or neutralization agent s in a soil-based site , or optimizing fish feed in a water source of aquaculture site, while reducing nitrogen contamination, comprising :

( a ) at least a partially transparent flow cell containing a water solution from the soil or the water source ;

(b ) a light source emitting the flow cell ;

( c ) a photodetector receiving said emitted light pas sing through the water solution contained within the flow cell and conveying a signal reflecting the intensity of the received signal to a spectrum analyzer and proces sing unit ;

( d) said spectrum analyzer and proces sing unit configured to determine ammonium or ammonia concentration within the water solution based on a dif ference between the emitted light and said light received at the photodetector in a frequency spectrum within the NIR spectrum range ; and

( e ) a regulation unit receiving said determined ammonium or ammonia concentration and regulating amount and rate of fertilizer or neutralizing agent input to the soil at the soil-based site or fish feed to the water source at the aquaculture in a tendency to reduce the ammonium or ammonia concentration in the soil or aquaculture , respectively .

2 . The system of claim 1 , wherein said ammonium or ammonia concentration determination is based on light absorption in one of the 2000nm-2400nm, 1400nm-l 650nm, or 170 Onm-1 90 Onm NIR bands .

3 . The system of claim 1 , wherein said regulated input to the soil in agricultural soil-based sites is fertilization and irrigation and said regulated input in non-agricultural soil-based sites comprises neutralization agent s . The system of claim 1 , wherein said water solution at the flow cell is collected from the soil by one or more suction cups positioned at one or more soil depths , respectively . The system of claim 4 , wherein a plurality of suction cups at one or more soil depths are utilized to evaluate a flow of nitrogen in various soil depths . The system of claim 1 , wherein said water solution at the flow cell is collected from water source . The system of claim 1 , wherein said spectrum analyzer conveys absorbance spectrum data reflecting said dif ference to the proces sing unit , and said proces sing unit utilizes machine learning techniques to determine the ammonium or ammonia concentration based on said absorbance spectrum data . The system of claim 3 , wherein said input to the soil is fertilization and irrigation in agricultural fields , and wherein said regulation unit further receives nitrate concentration in the soil , in addition to said determined ammonium concentration, and wherein said regulation of the fertilization and irrigation inputted into the soil is based on both of the determined ammonium concentration and on the nitrate concentration .

Description:
SYSTEM FOR MONITORING AND CONTROLLING AMMONIUM OR AMMONIA CONCENTRATION IN SOIL AND WATER

Field of the Invention

The invention generally relates to systems and methods for reducing contamination in water and soil , mainly resulting from exces s fertilization in soil and fish feeding in aquaculture . Specifically, the invention relate s to systems and methods that monitor and optimize crop yields and fish breeding while reducing nitrogen contamination in soil and water .

Background of the Invention

Ammonium or Ammonia (NH 3 ) are nitrogen (N) forms that naturally exist in shallow soils , water resources , and air and are es sential for biological proces ses in plant s and microorganisms . These N forms are es sential plant nutrient s and have been used mas sively as fertilizers in intensive agricultural fields in the last century . However, exces s use of fertilizers causes mas sive amounts of N to accumulate in the soil and migrate to natural water sources . Elevated concentration of N species above drinking water standard 50 mg L -1 ; NO2 3 mg L -1 ; 0 . 5 mg L -1 ) are considered a hazardous health risk, ultimately leading to disqualifying drinking water wells . In addition, the natural discharge of polluted groundwater to surface water, such as rivers , lakes , and even the sea, can ignite large-scale algae blooming and eutrophication, threatening aquatic environment s and marine life . Under cultivated field conditions , ammonium in the topsoil porewater can range from μg L -1 to hundreds of mg L -1 depending on the crop species , fertilizer application, and soil properties . Accordingly, achieving proper ammonium balance inside the root zone for maximum yield and minimal los s is challenging . While agricultural soils are often aerated and nitrate is the main N form that causes pollution, ammonium can be a dominant species under anoxic conditions . Such anoxic conditions may prevail under high organic loads , as often found under animal husbandry farms , landfills , mega industrial sites , septic ef fluent s , or even flooded conditions prevail under flooded agricultural pads . Anoxic soil conditions may lead to intensive ammonium transport across the unsaturated zone into the groundwater . For example , the anaerobic reducing environment underneath the landf ill waste body can release ammonium at very high concentrations from the biodegradation of organic waste matter . Following precipitation event s , these ions can be transported from the waste body to the unsaturated zone , reaching dozens to thousands of mg L -1 in the soil pore water . Similar conditions may prevail under animal husbandry premises where large ammonium quantities can leach down from dairy waste lagoons through the soil and deep unsaturated zones .

In aquaculture (breeding, raising, and harvesting of fish, shellfish, algae , crustaceans , mollusks , and other organisms in all types of water environments ) , ammonia is a waste product from the metabolism of fish, aquatic invertebrates , and microorganisms , and it is the second-most critical water quality factor for fish farming ( after oxygen levels ) . Ammonia can potentially damage the fish gills and stres s the body even in small doses . Fish that are continuously exposed to a low amount of ammonia have poor development and are more prone to bacterial illnes ses . High concentration ( >11 mg L -1 ) is lethal and can wipe out an entire fish population in a pond . The amount of food in the water is a factor that can regulate the water' s ammonia level . Overfeeding, however, causes an unregulated increase in ammonia concentration ( resulting from fish secretions and Bacterial decomposition of organic matter, such as uneaten feed) , slows the nitrification proces s , and harms fish health . Therefore , one of the most critical factors of fish farming is controlling the feeding rates and practices, thereby regulating the ammonia concentration.

Therefore, real-time monitoring of ammonium\ ammonia concentrations in soil and water can help to maximize agricultural and aquaculture yields, reduce fertilizer and fish feed waste, and reduce environmental damage.

WO 2020/250226 (partially by the same inventors as those of the present application) discloses an in-situ and real-time system for measuring nitrate concentration in soil in the presence of DOC. The system comprises a suction cup collecting soil water and passing the soil water stream continuously through a transparent optical flow cell, a light source (in the UV-VIS light range) for passing light beams in selected wavelengths through the water sample within the optical flow cell, and an analysis unit that calculates the nitrate concentration based on (a) light absorption by the sample; and (b) elimination of the DOC effects on the absorption. WO2022264126 and WO 2018/104939 (also partially by the same inventors) disclose other aspects relating to measuring the nitrate concentration in the presence of DOC. The above systems for measuring nitrate concentration in the presence of DOC are relatively complicated, given that the neutralization of the DOC effects on the acquired signal requires more resources that sometimes cannot provide high accuracy.

Nitrogen is an essential nutrient for plant development. In agriculture, nitrogen fertilization is critical for plant growth and yield. Plants consume nitrogen fertilizers mainly in the form of nitrate or ammonium. These may occur naturally from the biodegradation of organic matter or as commercial/ indust rial fertilizers such as nitrate and ammonium. Plant nitrogen consumption is very dynamic according to the growing phase conditions. Yet, it is limited to maximum levels that can be utilized physiologically. Therefore, irrespective of the source substance, excess fertilizers of either nitrate or ammonium (or both) leach down the soil and contaminate the groundwater and related surface water resources. In natural aerated soils, excess ammonium converts to nitrate; therefore, a fertilization system that depends only on the measurement of nitrate concentration in the soil does not provide the whole picture of excess fertilization. Therefore, the fertilization and irrigation system of WO 2020/250226 may somewhat suffer from inaccuracy.

In addition, to the best of the inventors' knowledge, no prior art has ever provided a system regulating the amount and frequency of feeding fish on the basis of real time continuous monitoring of ammonium concentration in the water, thereby improving fish health and productivity and reducing ammonium/ammonia contamination in the water. Furthermore, no prior art has ever provided a system regulating the amount and frequency of ammonium fertilization of soil in agricultural environments, thereby increasing crops yields and reducing ammonium/ammonia and nitrate (that is transformed from ammonium nitrification) contamination in soil and related water resources .

One invention' s object is to provide a system for regulating the amount and rate of fish feeding based on ammonium/ammonia concentration measurement in the water.

Still, another object of the invention is to provide said systems capable of providing a real-time, continuous, and automated measurement of ammonium. Another object of the invention is to provide a system for regulating the amount and rate of fertilizing based, among others, on the soil' s ammonium/ ammonia concentration measurement .

Still, another object of the invention is to provide a system for reducing ammonium/ammonia contamination in water and soil.

Still, another object of the invention is to provide a system for regulating and optimizing fertilization while reducing ammonium/ammonia contamination, which replaces or comes in complementary to the nitrate measurement systems described in WO 2020/250226, WO2022264126 and WO 2018/104939.

Still another object of the invention is to provide a realtime, continuous, and automated system for regulating the supply of neutralization agents in sites highly contaminated by ammonium or ammonia.

Other objects and advantages of the invention become apparent as the description proceeds.

Summary of the Invention

The invention relates to a system for optimizing fertilization or neutralization agents in a soil-based site, or optimizing fish feed in a water source of aquaculture site, while reducing nitrogen contamination, comprising: (a) at least a partially transparent flow cell containing a water solution from the soil or the water source; (b) a light source emitting the flow cell; (c) a photodetector receiving said emitted light passing through the water solution contained within the flow cell and conveying a signal reflecting the intensity of the received signal to a spectrum analyzer and processing unit; (d) said spectrum analyzer and processing unit configured to determine ammonium or ammonia concentration within the water solution based on a dif ference between the emitted light and said light received at the photodetector in a frequency spectrum within the NIR spectrum range ; and ( e ) a regulation unit receiving said determined ammonium or ammonia concentration and regulating amount and rate of fertilizer or neutralizing agent input to the soil at the soil-based site or fish feed to the water source at the aquaculture in a tendency to reduce the ammonium or ammonia concentration in the soil or aquaculture , respectively .

In an embodiment of the invention, the ammonium or ammonia concentration determination is based on light absorption in one of the 200 Onm-240 Onm, 1400nm-l 650nm, or 170 Onm-1 90 Onm NIR bands .

In an embodiment of the invention, the regulated input to the soil in agricultural soil-based sites is fertilization and irrigation and said regulated input in non-agricultural soilbased sites comprises neutralization agent s .

In an embodiment of the invention, the water solution at the flow cell is collected from the soil by one or more suction cups positioned at one or more soil depths , respectively .

In an embodiment of the invention, a plurality of suction cups at one or more soil depths are utilized to evaluate a flow of nitrogen in various soil depths .

In an embodiment of the invention, the water solution at the flow cell is collected from water source .

In an embodiment of the invention, the spectrum analyzer conveys absorbance spectrum data reflecting said dif ference to the proces sing unit , and said proce ssing unit utilizes machine learning techniques to determine the ammonium or ammonia concentration based on said absorbance spectrum data .

In an embodiment of the invention, the input to the soil is fertilization and irrigation in agricultural fields , and wherein said regulation unit further receives nitrate concentration in the soil , in addition to said determined ammonium concentration, and wherein said regulation of the fertilization and irrigation inputted into the soil is based on both of the determined ammonium concentration and on the nitrate concentration .

Brief Description of the Drawings

In the drawings :

- Fig . 1 generally illustrates in a block diagram form a realtime ammonium/ammonia regulating system, according to an embodiment of the invention ;

- Fig . 2a generally illustrates in a block diagram form a realtime ammonium/ammonia regulating system in soil , as applied to an irrigation system;

- Fig . 2b generally illustrates in a block diagram form a variant of the real-time ammonium/ ammonia regulating system of Fig . 2a ;

- Fig . 3 generally shows an open-loop ammonium/ammonia regulating system, according to an embodiment of the invention ;

- Fig . 4 generally shows a closed-loop ammonium/ammonia regulating system, according to an embodiment of the invention ;

- Fig . 5 generally illustrates how the system of the invention can be applied to a variety of environment s , such as agriculture , aquaculture , and sites with contaminated soil ;

- Fig . 6a generally illustrates in a flow diagram form a fertilization closed-loop regulation proces s based on ammonium and nitrate concentration measurements, according to an embodiment of the invention;

- Fig. 6b generally illustrates in a flow diagram form a fish feeding closed-loop regulation process based on ammonia concentration measurement, according to an embodiment of the invention;

- Fig. 6c generally illustrates in a flow diagram form a neuralizat ion agent of soil regulation closed-loop process based on ammonium concentration measurement, according to an embodiment of the invention;

- Fig. 7 illustrates the light absorption spectra of water and the correlation values between ammonium concentration and absorbance intensity; and

- Fig. 8 illustrates experiments setup, as used to test the validity of the system of the invention.

Detailed Description of Preferred Embodiments

Fig. 1 schematically illustrates in a block diagram form a realtime ammonium/ ammonia regulating system 200, according to an embodiment of the invention. When applied to monitoring ammonium concentration in soil, a small dead volume porous interface (suction cup) 202, as disclosed, for example, in WO 2018/104939, is placed in the soil to obtain a continuous low flux stream of soil porewater solution. The soil porewater flows through tube 204 to an optical flow cell 208 via a small diameter tubing 204. The sample extraction from the soil is driven, for example, by applying low pressure (vacuum) on the porous interface. After passing through flow cell 208, the sample may be discharged or accumulated at sample accumulation chamber 232 for further analysis or system calibration. The casing of flow cell 208 is at least partially transparent to allow the passage of light beams therethrough. A NIR (Near Infrared) light source 212, wideband or short band (such as LED or laser type) , illuminates the cell in a NIR wavelength, for example, in the band of 200 Onm-240 Onm . The term "flow cell" refers to any transparent receptacle containing the water solution extracted from the soil or aquaculture pool. While a slow flow of the water into and out of the receptacle is preferable, the water may be inserted into the receptacle or removed therefrom in any other manner (continuously or not) .

Alternatively, although less preferable, illumination in one of the bands 1400-1650nm or 1700-1900nm may be used. The beam of the light source 212 passes through the optical flow cell 208, where the soil porewater flows, while water constituents within the cell absorb some of the light beam' s energy. The absorption of ammonium or ammonia in the mentioned NIR light bands is much more dominant compared to water or other constituents that may exist in the water. The remaining energy from the beam of the light source 212 is accumulated (optionally by utilizing a band filter 244 in the relevant band used) by photodetector 224, forming an absorbance signal 252. Processing unit 240 calculates an absorbance signal reflecting the difference between the illumination intensity by the light source 212 and the light intensity accumulated by the photodetector 224. Then, based on the spectrum of the calculated difference signal and prior knowledge data, processing unit 240 determines the ammonium (or ammonia) concentration in the sampled water (and, therefore, in the soil 233) .

The description so far has demonstrated how the invention can be applied to determine the concentration of ammonium in soil. In aquaculture, ammonia (rather than ammonium) is more dominant and determining the ammonia concentration in aquaculture 253 is desired. Moreover, when applying the system to aquaculture, there is no necessity for using the suction cup 202. A water flow from the aquaculture pool 253 into flow cell 208 may be directly supplied via tube 255. Proces sing unit 240 preferably utilizes a pre-trained artificial intelligence (Al ) machine to trans form the absorbance spectrum signal into ammonium or ammonia concentration level . The inventors tested the applicability of the invention ' s system . Alternatively, a previously prepared database 259 ( such as in table form) trans forms each measured ( or calculated) spectrum absorbance to ammonium or ammonia concentration, whichever is the case .

As elaborated below, experiment s with the Al version of the system of the invention have shown an accuracy of 98% in determining the ammonium concentration in soil . Ammonium and ammonia have similar absorption bands in the NIR range . Consequently, determining ammonia concentration in aquaculture likely yields the same accuracy or substantially similar result s .

Nitrogen fertilizer used in agriculture can include nitrate (NO^ ) , ammonium and urea CO(N 1^2)2 • When an ammonium- based fertilizer is applied to an agricultural field, some of the ammonium undergoes nitrification by soil bacteria and becomes nitrate , depending on the field conditions . Therefore , controlling the concentration of ammonium-based fertilizer can also control the amount of nitrate . While the regulation and control of nitrate in the soil was described in WO 2020 / 25022 6 , WO20222 6412 6 , and WO 2018 / 104 939 , there is no comparable system for controlling ammonium, rendering full optimization of nitrogen fertilization in agricultural fields impos sible . Monitoring and controlling the ammonium concentration in agricultural fields , alone or in combination with said nitrogen control systems , can close the nitrogen fertilization cycle , thereby optimizing the amount of nitrogen fertilizer applied to the plant s while reducing leaching of contamination to groundwater . Fig. 2a generally illustrates a structure of system 400 of the invention applied to an irrigation system. This system is somewhat similar to the system described in WO 2022/264126; however, the present system measures ammonium concentration in the soil based on a water sample rather than nitrate concentration in the presence of DOC. System 400 includes at least one sensor 402c (suction cup, three are shown in the figure) , positioned at depth h lr for example, below the roots zone of the plants. The system may include, in addition, one or more optional higher-positioned sensors (or lower-positioned) , for example, sensor 402b at depth h 2 within the roots zone and sensor 402a at depth h 3 above the roots zone, where hi > h 2 > h 3 . Each sensor 402 transfers its sample (typically a slow flow of water sample) to a respective optical flow cell 408 (in this case, one flow cell is provided for each suction cup 402) via a respective tube 420, as described, for example, in WO 2018/104939.

As noted above, nitrogen is essential for the development of plants, and nitrogen fertilization supply, among others, the appropriate amount of nitrogen to the plant. Plants consume nitrogen from nitrate or ammonium existing in the soil, irrespective of the source substance, while an excess of either nitrate or ammonium (or both) contaminates the groundwater. As time progresses, the ammonium in the soil converts to nitrate. Therefore, in most agricultural cases, a fertilization system that solely depends on measuring nitrate concentration or only measuring ammonium in the soil may not provide a satisfactory result for excess fertilization. Spectral analyzer 410 (within processing unit 440) determines (preferably in real-time) the ammonium concentrations 412, respectively, in each depth for which a sensor 402 is available. The measured ammonium concentration and nitrate levels (as conveyed from a nitrate concentration measurement system 457) are supplied to the irrigation and fertilization controller 414. The fertilization and irrigation controller also receives a plan 418 for optimal irrigation and optimal fertilization that the specific crop needs and is expected to utilize for its optimized development, as known from the literature and guides. Given at least one ammonium concentration at a representing depth for the specific crop 402c, and its recent change (namely, calculated propagation of ammonium relative to the previous measurement) , controller 414 activates the irrigation and fertilization actuators, respectively, to ensure providing the crops with the optimal requirements 418 while also minimizing any increase of ammonium and nitrate that is transformed from excess ammonium concentration at depth due to excess of fertilization. It should be noted that plan 418 may indicate on the crop needs. However, the distribution of the fertilization and irrigation amounts are flexible and may be changed according to the agronomic conditions, and controller 414 manages the irrigation and fertilization actuators to (a) ensure that optimal requirements 418 are met in the long run; and (b) manages actuators 404 and 424 such that the excessive ammonium (or nitrate derived from nitrification of excess ammonium, assuming that optional nitrate concentration measurement 457 also exists) below the roots zone, as measured by sensor 402 c , is minimized. It should also be noted that the plant' s capability to accumulate ammonium from below the roots is substantially zero, so all the ammonium measured by sensor 402c is substantially excessive, lost, and is expected to contaminate the groundwater. Moreover, as the crops' capability to collect fertilization is limited, overfertilization does not necessarily result in a higher yield, but it causes higher contamination of groundwater and related water resources. The nitrate concentration measurement device 457 may be of any known in the art, for example, any of the nitrate measurement devices disclosed in WO 2020/250226, WO2022264126, and WO 2018/104939. It should be noted that combining nitrate concentration measurements with ammonium concentration measurements is required (or preferable) only in the agriculture version of the invention' s system. The aquaculture ammonia measurement and ammonium-contaminated sites do not require a combination with nitrate measurements.

Controller 414 may also utilize 3 rd party weather and rain data, including forecasting information in its management of the fertigation and irrigation that minimizes the flow of ammonium to below the roots zone.

As noted, at least one sensor (402 c ) should be positioned at depth hi preferably below the roots zone, as this is the minimum number of sensors by which controller 414 can operate to minimize excessive ammonium presence below the roots zone. This task can be fulfilled by controller 414 estimating the ammonium concentration at the roots zone and above, given the knowledge about the fertilization already provided and the capability of the crop to collect fertilization within a given period. However, a sensing unit 402 with three sensors at different depths above the roots zone, within the roots zone, and below the roots zone is highly preferable. This multi-depths configuration best provides controller 414 with the capability to determine ammonium distribution, gradients, and flow dynamics within the soil cross-section and with the capability to fine-tune the ammonium concentration levels within or above the roots zone before the ammonium arrives at the deepest sensor' s 402 c position, where it is too late to use it. Fig . 2b shows another preferred embodiment of the invention, where soil moisture sensors 403a, 403b, and 403c are added at each ( or a part ) of the suction cups 402a, 402b, and 403c locations , respectively . Sensors 403a, 403b, and 403c provide system 400 with more accurate details on the ammonium concentration and soil water content at each of the depths , namely, above the root s , at the root s , and below the root s . In such a manner, controller 414 has a broader view of the field situation and flow dynamics , enabling it to manage irrigation and fertigation better .

The light source 412 generally applies light on the optical flow cells 408 in the near-infrared (NIR) or mid-infrared (NIR - MIR, 800 - 24 , 000nm) . The photodetectors (not shown ) are also suited to operate in the same range . The inventors have found three "windows" within the NIR band where it is better to operate , as water molecules do not ( or minimally) absorb light in these ranges , but ammonium does , as follows : 2000nm-2400nm (best band) , 1700nm-1 900nm, and 1400-1 650 . The light from the light source propagates through the flow cell 408 or i s reflected from it and received by the photodetector (not shown ) . The water is extracted from the soil using a suction cup 402 and a vacuum system and routed through the optical flow cell , which is connected from each side to a pipe 204 that allows the sample solution to flow continuously . The spectral data analyzed by spectral analyzer 410 is utilized to quantify ammonium\ ammonia concertation and other chemicals that may exist in the solution . A spectral database determines the ammonium ( or ammonia ) concentration . A pre-trained machine learning unit calculates ammonium concentration using a multivariant machine learning algorithm in a second embodiment . In the latter case , the proces s for calibrating the spectral analyzer is as follows : i. Various soil or water solutions from different sites with different chemical compositions are collected for a chemical and electro-optical analysis at a laboratory. ii. Ammonium is spiked at different concentrations in each solution . iii. The spectral absorption or reflection from NIR to Mid IR is measured in each solution. iv. A matrix of absorption\ref lection intensity as a function of wavelength is generated. v. The absorption\ref lection intensity matrix for bands that absorb the most energy, e.g., those most sensitive to ammonium concentrations, is determined. vi . Pre-processing techniques like normalization, derivatives, smoothing, and averaging may be applied to the spectra to improve accuracy. vii. Machine learning algorithms create a trained model for predicting the ammonium concentration in a solution consisting of an unknown ammonium concentration.

In real-time (or operational stage of the system) , the following process is performed: i. A solution from soil or water (particularly applicable to aquaculture) is extracted from the soil or water source by a suction cup 402 or otherwise) , respectively. ii. Spectral analyzer 410 measures and processing unit 440 analyzes the spectral absorption or reflection in the selected wave bands from the calibration procedure. iii. A matrix of absorption\ref lection intensity as a function of wavelength is generated. iv. In some cases, pre-processing techniques like normalization, derivatives, smoothing, and averaging are also applied to the spectra to increase the accuracy . v . The previously trained machine learning unit is used to predict the ammonium concentration in the extracted solution .

System 200 of the invention may operate either in an open-loop configuration or in a close-loop . In a pos sible open-loop control , the output is not fed back to the input . Thus , the control action is independent of the desired output . Fig . 3 illustrates a pos sible open-loop control of the invention' s system in block diagram form . The input is fertilization, fish feed or naturalizing agent (the neutralization agent is a material used in soil to neutralize the ammonium or ammonia concentration ) . The output signal is the ammonium ( or ammonia ) concentration at the measuring point .

The implementation of an open-loop system may include two phases :

( a ) A training phase : Sensors are positioned within the soil or water during the training phase . Then, a known volume of ammonium is in j ected . Monitoring the change of concentration as a function of time at all locations provides the data required to build a model of ammonium propagation in the soils or in water ( ammonia ) .

(b ) The operational phase : During this phase , based on the measured ammonium concentration and the model developed in the training phase , and a model f rom the literature , the control system, control current of fertilization, irrigation, neutralizing agent or fish feed according to specific application .

In a closed-loop control , the input is provided to a controller, producing an actuating or controlling signal . Then, this signal is supplied as input to a plant or to the process supposed to be controlled. So, the plant produces an output, which is the controlled ammonium concentration. As such, the controlled action depends on the desired concentration level, as shown in Fig. 4. The error detector produces an error signal, reflecting the difference between the input and the feedback signal. The feedback signal provided from the "feedback-elements" block is sampled from the output. Rather than direct input, the error signal is applied as an input to the controller. In the present case, the input is the fertilizer, neutralizing agent, or fish food, and the output signal is the determined ammonium concentration. The plant or fish, i.e., the controlled object, indicates the relationship between an input signal and the system' s output signal. The feedback element is the signal generated by the sensor. The close loop scheme therefore provides an automated, real time operation.

One way to implement the control system is by a PID (Proport ional-Integral-Derivat ive ) controller. A PID controller continuously calculates an error value e (t) as the difference between the desired setpoint and a measured process variable in the present case, the ammonium concentration at, above, or below the root zone, respectively and applies a correction based on proportional, integral, and derivative terms. As implied by its name, PID (Proportional-Integral-Derivative) refers to the three terms operating on the error signal to produce the control signal. For example, let' s assume that u(t) is the control signal sent to the system, y(t) is the measured output, and r(t) is the desired output, where e (t) = r(t)-y(t) is the tracking error. The PID controller has the general form of equation ( 1 ) :

(1) The desired closed-loop dynamics are obtained by adjusting the three parameters often iteratively by "tuning" and without specific knowledge of a plant (control theory) model. Stability can often be ensured using only the proportional term. The integral term permits the rejection of a step disturbance (often a striking specification in process control) . The derivative term is used to provide damping or shaping of the response. PID controllers are the most well- established class of control systems. In the present case, the three parameters are adjusted according to the ammonium concentration requirements.

In the present case, the three parameters and K D , are adjusted according to the ammonium requirements for the growing stage of the plant (or fish) , based on a literature model.

The real-time detection and control system of ammonium or ammonia may be implemented, for example, in three cases (Fig. 5) : (i) In agriculture soils to optimizee nitrogen fertilizers and reduce leaching; (ii) In aquaculture to optimize fish feed and improve fish health; and (iii) In contaminated soils that are prone to ammonium pollution, to prevent ground and surface water pollution, using neutralization agents.

A. Application of the system in Agriculture:

Nitrogen fertilizer used in agriculture typically include nitrate (NO^) , ammonium, and urea While WO 2020/250226 discloses techniques for measuring the nitrate concentration in soil, a technique for measuring the ammonium concentration in soil does not exist, not enabling a complete optimization of nitrogen fertilization in agricultural fields. The techniques disclosed by the invention for monitoring and controlling ammonium in agricultural fields close the nitrogen fertilization cycle and optimize the amount of nitrogen fertilizer applied to plants. The system of the invention optimizes the amount of nitrogen fertilizer applied to plants. In one example, the system continuously collects and optically analyzes pore water from the soil, transmits the optical data to a remote server, and calculates, based on machine learning algorithms, the ammonium concentration in the soil and recommends the amount of fertilizers that should be applied. Fig. 4 discloses such a closed-loop control. As previously noted, the agriculture version of the system requires in most practical cases, in addition to the ammonium measurement, an indication relating to the nitrate concentration to best evaluate the nitrogen content in the soil, and to best regulate the fertilization.

Fig. 6a generally illustrates in a flow diagram form a fertilization regulation closed-loop process 620, based on ammonium concentration, according to an embodiment of the invention. In step 622, fertilization is applied to the soil. In step 624, a continuous flux of porewater is acquired from the soil and conveyed to a flow cell. In step 626, the light is applied to the flow cell and collected. A spectral analysis of the light passing through (or reflected from) the flow cell is also performed by spectral analyzer 410 (Fig. 2a) . In step 628, the spectral analyzer signal (or signals) is conveyed to a pre-trained machine learning unit (or another) for determining, based on the spectral analyzer signal, the ammonium concentration in the soil. The ammonium concentration, as determined, is then conveyed to a controller (414 - Fig. 2b) . In step 632, the controller decides about actions relating to the field' s fertilization and irrigation, such as if, when, and in what dosage to supply fertilizer and/or irrigation. In step 638, the f ert ilizat ion/or irrigation is supplied to the field back in step 622. If the timing to take action has not yet passed or the controller in step 632 determines that no action is necessary, the procedure returns to step 626 for repetition of steps 626, 628, and 632 until the controller determines in step 632 that taking action becomes necessary.

B. Application of the system in Aquaculture:

Monitoring and controlling the ammonia concentration in aquaculture optimizes the amount and rate of fish feeding, improving fish health and preventing (or reducing) mortality. The system continuously collects water from the open water source (pond, aquarium, lake, pool etc. ) , analyzes it optically, and transmits the optical data to a remote server where a machine learning unit determines the ammonia concentration. Based on the ammonia concentration, the processing unit recommends the amount, time and rate of the fish feeding that should be applied while minimizing the ammonia contamination of the water.

Fig. 6b generally illustrates in a flow diagram form a fertilization closed-loop process 660 according to an embodiment of the invention. In step 662, fish food is provided to the water. In step 664, a continuous water flux is acquired from the pool and conveyed to a flow cell. In step 666, the light is applied to the flow cell and collected. A spectral analysis of the light passing through (or reflected from) the flow cell is also performed by spectral analyzer 410 (Fig. 2a) . In step 668, the spectral analyzer signal (or signals) is conveyed to a pre-trained machine learning unit (or another) for determining, based on the spectral analyzer signal, the ammonia concentration in the soil. The ammonia concentration, as determined, is then conveyed to a controller (414 - Fig. 2b) . In step 672, the controller decides about actions relating to the fish feeding, such as if, when, and in what dosage to supply food to the pool. In step 678, the food is supplied to the pool back in step 662. If the timing to take action has not yet passed or the controller in step 672 determines that no action is necessary, the procedure returns to step 666 for repetition of steps 666, 668, and 672 until the controller determines in step 672 that taking action becomes necessary.

C. Application of the system in sites suffering from ammonium contamination : Monitoring ammonium concentration in soil and applying neutralizing agents within highly polluted sites reduces the downleaching of nitrogen species to groundwater or water resources .

Fig. 6c generally illustrates in a flow diagram form a closed-loop process 720 for applying neutralizing agents in ammonium/ ammonia contaminated soil, according to an embodiment of the invention. In step 722, a neutralization agent is applied to the soil. In step 724, a continuous flux of porewater is acquired from the soil and conveyed to a flow cell. In step 726, the light (broadband or a single wavelength) is applied to the flow cell and collected. A spectral analysis of the light passing through (or reflected from) the flow cell is also performed by spectral analyzer 410 (Fig. 2a) . In step 728, the spectral analyzer signal (or signals) is conveyed to a pre-trained machine learning unit (or another) for determining, based on the spectral analyzer signal, the ammonium concentration in the soil. The ammonium concentration, as determined, is then conveyed to a controller (414 - Fig. 2b) . In step 732, the controller decides about actions relating to applying the neutralization agent, such as if, when, and in what dosage. In step 738, the neutralization agent is applied to the soil back in step 722. If the timing to take action has not yet passed or the controller in step 732 determines that no action is necessary, the procedure returns to step 726 for repeating steps 726, 728, and 732 until the controller determines in step 732 that taking action is necessary.

FURTHER DISCUSSION AND EXPERIMENTS

Developing technologies for continuous measurement of nitrogen forms in the soil is essential to optimize the application of fertilizers in agriculture and prevent water resource pollution. Nevertheless, there are no efficient commercial, of-the-shelve benchmark technological solutions for continuously monitoring ammonium/ ammonia species in soil porewater or aquaculture. The invention provides, among others, a novel approach for real-time (or offline, although less preferable) measurement of ammonium in soil or ammonia in aquaculture using near-infrared spectroscopy and Partial Least Square Regression (PLSR) for spectral analysis. The inventors trained a PLSR model using soil porewater collected from various soils spiked with ammonium to achieve a wide concentration range. The approach was validated by transport experiments in a soil column elaborated later. The results demonstrated the capabilities of real-time, temporal variations tracking of ammonium concentration in soil. The system may similarly be used in highly ammonium-contaminated sites and fish-feeding systems in aquaculture, where ammonia is dominant .

Deteriorated natural water resources, such as groundwater and surface water, are often attributed to various point or nonpoint sources associated with industrial, urban, and agricultural activities. Yet, according to the UN World Water Development Report 2018, one of the leading causes of water resource deterioration is the excess application of fertilizers in agriculture. Excess fertilizer application is commonly practiced worldwide to prevent nutrient deficiency and yield reduction. Unfortunately, plants cannot utilize excess nitrogen (N) fertilizers in the soil. The excess ultimately leaches down from the root zone through the unsaturated zone (also termed the vadose zone) to groundwater. Although, on a global scale, agriculture forms the largest non-point source of N pollution of water resources, high levels of N in water resources are also related to other pollution sources such as landfills, animal husbandry farms, and wastewater treatment facilities. The economic and ecological consequences of N pollution are significant. Elevated concentration of N species above drinking water standard are considered hazardous health risk which ultimately lead to disqualification of drinking water wells. In addition, natural discharge of polluted groundwater to surface water, such as rivers, lakes, and even the sea, can ignite large-scale algae blooming and eutrophication, threatening aquatic environments and marine life.

Ammonium and nitrate are the most readily accessible inorganic N forms for plant uptake. It is the limiting factor for crop yield and is therefore considered the main N fertilizer. While nitrate is a stable mobile anion that may be easily transported in the soil, ammonium is a positively charged ion subjected to sorption. Its mobility and presence in soil porewater are highly affected by its affinity for negatively charged surfaces and lattice vacancies, presented in natural clay minerals like Vermiculite, Montmorillonite, and Illite. Due to its absorption attraction to clay minerals, ammonium transport in aerated soils is considered low and strongly dependent on the soil oxidation conditions. Over time, these fixed ions can diffuse and release from the clays back into the porewater, allowing the roots and microorganisms to use them again . Under cultivated field conditions , ammonium in the topsoil porewater can range from μg L -1 to hundreds of mg L -1 depending on the crop species , fertilizer application, and soil properties . Accordingly, achieving proper ammonium balance inside the root zone for maximum yield and minimal los s is challenging . While agricultural soils are often aerated and the main N form that causes pollution is nitrate , ammonium can be a dominant species under anoxic conditions . Such anoxic conditions may prevail under high organic loads , as often found under animal husbandry farms , landfills , mega industrial sites , septic ef fluent s , or even flooded conditions often prevail under flooded rice pads . Anoxic soil conditions may lead to very intensive ammonium transport across the unsaturated zone into the groundwater . For example , the anaerobic reducing environment underneath the landfill waste body can release ammonium at very high concentrations from the biodegradation of organic waste matter . These ions can be transported from the waste body to the unsaturated zone following precipitation event s and can reach from dozens to thousands of mg L -1 in the soil pore water . Similar conditions may prevail under animal husbandry premises where large quantities of ammonium can leach down from dairy waste lagoons through the soil and deep unsaturated zone . Therefore, real-time detection of ammonium in the soil is of high importance to optimizing fertilizer application and preventing water resource pollution .

Monitoring N species in the soil i s the key to preventing water resource pollution . Soil analysis is a broad discipline that includes various tools for managing fertilizers in agricultural areas and identifying pollutant s during their transport through the unsaturated zone . The lack of in-situ, fast , low-cost , robust , and high-resolution technologies for characterizing nitrogen in the soil makes it dif ficult to detect these pollutant s precisely . Optical spectroscopy based on reflectance analysis, such as equipment utilizing images captured by airplanes, satellites, etc., or equipment that shines light on topsoil and collects the reflectance, poses a great solution as base technology for real-time soil analysis. These methods are fast, non-destructive, non-polluting, can be done on-site, and can determine several properties simultaneously if broad wavelength bands are used. However, optical reflectance is not designed to track the soil porewater, which is more subjected to sudden changes in the chemical composition and nutrient exchanges during different stages of the growing phases, irrigation, and fertilizer application. The measurement of porewater offers a glimpse into these soil' s fast processes and is thus more adapted for a real-time sensor.

Ammonium has few spectral signatures in the NIR range (800- 2500nm; 12, 500-4000 cm -1 ) due to overtones and combination bands of fundamental vibrations. However, NIR transmission spectroscopy can be limited when applied to solutions because water (// 2 0) molecules have dominant and broad absorption bands in the NIR range. Accordingly, other molecular bonds that absorb light at the same bands, such as N-H, C-H, and O-H, can be masked by the strong absorption of water. This effect creates a significant analytical interference because transmission spectroscopy is based on quantifying the changes in absorbance intensity. Hence, accurate analysis of water samples with NIR techniques must consider other important parameters that can increase the signal intensity, such as light path length and specific wavebands.

The invention presents a new technique for ammonium detection in soil porewater using NIR absorption spectroscopy. The invention also applies this technique to detecting ammonia concentration in aquaculture. The inventors used a specific NIR band (2100-2300 nm) with a strong absorption band of dissolved ammonium ions to determine ammonium concentration in soil. The spectral data is analyzed with the partial least squares regression (PLSR) algorithm to quantify ammonium concentration in soil porewater. A trained model was based on spiked porewater from different agricultural soils. Once the ammonium analytical model was established, the concept was tested and validated through a soil column experiment .

The correlation coefficient (R 2 ) between absorption values and concentration of specific analyte in a standard solution is a commonly used technique for determining specific absorption bands. The R 2 was calculated from an ammonium standard solution batch and absorption intensity in the NIR range, as shown in Fig. 7. The left-side y-axis shows correlation values between ammonium concentration and absorbance values in each specific wavelength. The Right-side y-axis shows the water absorption intensity curve (indicated by A) in the NIR spectrum (a.u.- arbitrary units) . As can be seen, the largest difference exists within 2000-2400nm.

Some R 2 values around 1450 nm, 1950nm, and above 2350nm show large variability due to high water absorption intensity. These wavelengths are associated with the first overtone of the OH- stretching band (2v 13 ) , OH combination band (2v 13 + v 2 ) and the fundamental vibrations (v 13 ) of water molecules (H 2 O) , respectively. These water vibrations absorb a large portion of NIR light that goes through the sample, strongly masking other potentially detected molecules. The wavelength band between 2100 - 2300 nm showed the highest correlation coefficients with R 2 > 0.92 (p < 0.01 ) , and therefore, has been found optimal for building a calibration model (PLSR Model Range in Fig. 7) . This band is associated with strong N-H bond light absorption and was also observed and used by biology studies of cell culture and fermentation. Although the absorption bands at 1490nm, 1590nm, and 1800nm present R 2 = 0.61 , R 2 = 0.35 and R 2 = 0.72, respectively, the inventors decided not to include them to make the model compact. These were associated with overtones and combination band of N-H.

Some of the recorded 2100-2300nm spectra from the spiked soil porewater samples (n = 106) showed high variation. The inventors assumed that since the porewater was collected from different agricultural soils characterized by different chemical compositions, different spectral profiles were observed. These variations were both expected and essential, as one of the inventors' primary goals was to train a model with a large spectral pool. The inventors concluded that a single variable (single wavelength) calibration approach is inappropriate since it relies on a single value that might be biased due to high noise, resulting in mismatched results. Therefore, the inventors used a PLSR model. Conventional methods of a single variable (one wavelength) have poor outcomes in the NIR range due to the significant noise present in the received signal. Utilizing artificial intelligence (Al) , the inventors overcame the noise and minimized measurement error by using multiple variables (such as multiple wavelengths) to extract the most important information from the absorption spectra accurately. While Al has shown excellent performance, other conventional techniques may be applied to convert the spectra to ammonium/ ammonia concentration .

Developing a PLSR or any other regression algorithm requires a broad and varied number of samples for the training set to obtain a reliable and robust model. Since the inventors used a wide range of chemically heterogeneous water samples spiked with a known amount of ammonium (l-1000mg L -1 ) , analyzed in a strong band (2100-2300nm) , the inventors assumed that a relatively small number of samples (n = 106) would suffice to build an accurate prediction model. Of course, using a larger training set of samples yields a more accurate predictive model. Based on the spiked soil porewater samples' 2100-2300nm spectra, the PLSR calibration model was developed. The first necessary step was finding the optimal number of the Latent Variables (LVs) using the explained variance and Mean squared prediction error (MSEP) . Overfitting caused by choosing a large number of LVs might lead the PLSR model to include noises in the data, resulting in a biased training model. On the contrary, a too- small number of LVs may result in information loss. The inventors found that using two LVs leads to 98%< of the explained variance in the spectra (X-matrix term) . This fact was not surprising since the inventors used a broad wavelength with a strong ammonium absorption. The explained variance term only supported estimating the minimum number of LVs and not the optimal number. The minimum point of MSEP values was in 6 LVs; however, the changes of the error dropped dramatically after four LVs, meaning that this was possibly a more optimal number of LV. In the column transport experiment the inventors also checked the PLSR model with 6 LVs and found that the estimation for 4 LVs gives more accurate results.

The 4-LV PLSR model was evaluated with an adjusted correlation coefficient ( ) and root mean square error (RMSE) by regressing the observed on the predicted responses (concentrations) . The results were R 2 adj = 0.985, root mean squared error of calibration (RMSEC) = 30.5 (mg L _ x ) and p < 0.01 . For validation, the model was trained with 80% of the data (calibration set) and was tested on the remaining 20% (prediction set) . The results from the calibration set were = 0.983, RMSEC= 30.5 (mg L -1 ) and p< 0.01 . The prediction set results were = 0.995, root mean squared error of prediction (RMSEP) = 19.1 (mg L -1 ) and p< 0.01. The values of the trained PLSR model were >0.98. However, The RMSE values were in the dozens of milligrams per liter. The motivation for assessing the Limit of Detection (LOD) was to determine the lowest ammonium concentration that can be reliably detected within a solution using this approach. The LOD was tested using Allegrini and Olivieri' s (2014) technique, which is adapted to the PLSR model and follows the International Union for Pure and Applied Chemicals (IUPAC) standards. The LOD results were 1.40 - 2.62 mg L -1 (LOD min — LOD max ) . This range specifies that concentrations below the LOD min cannot be detected, while those above the LOD max can be detected in a high confidence level of (p < 0.05) . Concentrations between these values (1.40 < y< 2.62) , need to be carefully tested. Using a more sensitive device or a different spectral band may have resulted in a different LOD, but these were not tested. The results emphasize how well the model may be adapted for lower concentrations and shallow agricultural soils where these concentrations are more prevalent.

Experiment

A real-time experiment of ammonium transport in two soil columns was tested utilizing the trained PLSR model. Each column is a large, drained cylinder filled with soil - used in the basic lab soil test coping with natural soil conditions. One column was filled with sandy, loamy soil (SL) , and the other, SL mixed with compost (SLM) in a 10% weight ratio to determine the impact of soil organic matter and other natural soil-water constituents on ammonium transport and spectral properties. The columns were irrigated daily with fresh water or ammonium solution, and the porewater samples were collected from the column 3-4 times a day using special customized low-dead-volume suction cups to track the ammonium breakthrough.

Fig. 8 illustrates the experimental column setup 820 used for measuring ammonium transport in soil. A TDT sensor (wetness sensor) 8continuously monitored water content (WC) and Electrical conductivity (EC) measurements within the soil columns throughout the experiment. The two soils' hydraulic and chemical conditions were very different since compost in the soil is expected to increase the water retention, salinity, and DOC. As expected, the mean volumetric WC in the SL was 15% and 19.3 % before and after irrigation events, respectively, while in the SLM column, the mean WC was much higher, ranging from 20.75% and 28.15%, before and after the irrigation cycles, respectively. The EC values of the water samples from the SL column were almost insignificant. They ranged between 0.01-0.5 dS/m (decisiemens/meter) , while in the SLM column, the values were much higher and ranged between 0.2-1.1 dS/m throughout the experiment, signifying salinity release from the compost. The mean pH values in both columns were relatively similar, ranging from 7.4210.05 and 7.4910.05 in the SL and SLM columns, respectively. However, the initial TOC values drastically differed with 7 and 147 mg L -1 for the SL and SLM soils, respectively .

Along with the standard laboratory analysis, the ammonium concentration in the soil pore water, as predicted by the PLSR- trained model for the NIR spectroscopic analysis, presents ammonium breakthrough curves in the soil columns.

A clear ammonium breakthrough appeared at both columns after 2.5, and 3.5 days at the SL and SLM soil columns, respectively. The ammonium breakthrough within the SLM retarded significantly compared to the breakthrough within the SL soil due to the high organic content of the SLM column. Six days after initiating the ammonium application, the concentration in the SL column reached a maximum of ~ 900 mg L -1 , and the irrigation water was again replaced by tap water. The maximum concentration in the SLM column reached only 705 mg L -1 . Immediately after switching back to freshwater, the reduction in ammonium concentration was observed with an expected delay in the SLM column. Ammonium retardation in both soils was related to fixation and absorption of both minerals and organic matter in the soil. Therefore, the absorption saturation degree dictates ammonium mobility in the soil. Although ammonium transport in the soil is of great interest, the inventors focused on the novel optical analytical procedure and not the transport process in this experiment.

Through these long-term measurements, the inventors obtained comparative results (R 2 = 0.98,RMSE= 31.2 mg L -1 and p< 0.01 in the SL column; and R 2 = 0.98,RMSE= 28.4 mg L -1 and p< 0.01 in the SLM column. The validation data points for the ammonium measurements were based on the total N (TOC/TN) . At 900 mg L -1 of ammonium, a few ppm of nitrate is not a significant concern. However, since ammonium can be transformed to nitrate through nitrification in soil and the ammonium concentration was lower at other stages of the experiment, it was important to determine the actual concentrations of all N forms. An ion chromatograph was used to test five samples during the experiment for other nitrogen species including nitrate and nitrite to validate this hypothesis. The inventors found that in the SL column, nitrate concentrations ranged from 0.5 to 1 mg L -1 (0.2 to 0.8% of TN) , and nitrite concentrations ranged from 0.5 to 2.6 mg L -1 (0.4% to 3% of TN) . In the SLM column, which contains more organic matter, nitrate concentrations were higher, ranging from 0.7 to 18 mg L -1 (2.8% to 8.6% of TN) , and nitrite concentrations ranged from 1.1 to 12 mg L -1 (1.6% to 7.3% of TN) .

The ammonium concentration range studied was rather high, reaching 1000 mg L -1 . Although in aquatic environments, the concentration range considered highly polluted is in the range of few to tens of mg L -1 , under intensive fertigated soils, landfills, and manure ponds the concentration may reach very high concentrations of hundreds of mg L -1 . Nevertheless, a low concentrations PLSR model can be built to adapt the approach to aquatic environments and fertigated soils.

To optimize the optical band for the PLSR model, the inventors performed a correlation coefficient (R 2 ) test using ammonium chloride Merck EMSURE® standards solutions in double distilled water. The dilutions were 31, 62, 125, 250, 500, and lOOOmg L -1 ' covering a wide concentration range. The samples were measured in the entire NIR spectrum (1000nm-2500nm) using Cary® 5000UV- Vis-NIR (Agilent) spectrometer. The correlation coefficient (R 2 ) was calculated for each wavelength separately. The calculation of the R 2 values were done using Microsoft Excel RSQ function.

Ammonium measurements in soil porewater combining NIR absorption spectroscopy with the PLSR algorithm requires the development of a training model based on collecting samples with known ammonium concentrations and varying chemical composition. Four agricultural soils from the southern Israel coastline were used: (/) organic greenhouse, which is based on compost fertilization; (//) conventional greenhouse, which is based on industrial fertilizers; (///) Open cultivated field of mixed crops; and (IV) sandy soil mixed with commercial compost. The soils were packed into a 45cm long and 29cm diameter column. A customized smallvolume ceramic suction cup was placed at 25cm depth. The columns were irrigated daily with tap water, and soil porewater was collected using suction cups. The soil porewater collected from each column was separated into 27 vials (a total of 106 samples) ; Each sample contained 4ml. Each vial was spiked with a different amount of standard solution made from Merck EMSURE® ammonium chloride (NH 4 CL) salt dissolved in tap water (EC of 270 . The spikes ranged from 1-1000 mg L-l to cover a wide range of concentrations ranging from the minimal natural conditions to the maximum that follows fertilization event s . The ammonium concentrations in the porewater were corrected based on the ratio ammonium /ammonia (NH^ ) and pH-temperature table .

All NIR spectra were measured using Cary® 5000 UV-Vis-NIR (Agilent ) spectrometer equipped with a PbS ( Lead (Pb ) Sulfur ( S ) - a semiconductor material ) detector . Measuring water solutions at NIR is pos sible by increasing the signal-to-noise ratio by reducing the light path length in a narrow-width cuvette and selecting the best wavelength region . Therefore , a thin 1mm pathlength fused quart z cuvette with 0 . 4ml volume was used to measure the spiked solutions . The first absorption scan for optimizing the wavelength was 1000nm-2500nm with a spectral resolution of lnm . After the optimization, the inventors only scanned the 2000nm-2500nm range . The scan rate at the 2000nm- 2500nm was 300nm/min with a spectral resolution of 0 . 5 nm . Baseline corrections were made with double distilled water as a reference .

Each sample was scanned three times to average the noises produced by the spectrometer, and the mean spectra were calculated . Then, the spectra data was smoothed with a Gaus sian- weighted moving average filter with 21-point window size . Smoothing was made using a MATLAB R201 9a smoothdata function .

A multivariant statistical PLSR algorithm was developed to predict the ammonium concentration in soil pore water from the spectral absorption data in the NIR wavelength range . The algorithm pro j ect s the original spectral dataset (%; also denoted "predictors" ) and the chemical concentrations (y also denoted "responses" ) of the solution, to smaller orthogonal and uncorrelated dimensions , also known as LVs , and finds the maximum covariance between those parameters . This chemometric technique is widely used for soil analysis because it can quantify several properties or chemical values and can find underlying patterns or relationships from overlapping spectral peaks. Moreover, this method has several advantages over other regression techniques such as principal component regression (PCR) because the algorithm considers both the predictors and the responses and calculates them simultaneously. This creates a smaller and more compact model than PCR; it also handles missing data better and takes into consideration errors in the predictors. Other techniques, such as deep learning convolutional neural network, have no significant advantages over PLSR when using particularly small-size training models (n<1400) and the computation costs are higher.

In practice, the LVs can be used to predict the concentration of ammonium in new samples based on their spectral profiles using the PLSR. This can be done using Equation (1) : (1)

Where the predictors etc. ) are combined with their corresponding coe fficients to predict the responses (y) . The error term (s) represents the difference between the predicted response and the actual response. To calculate the LVs and the regression coefficients Equations (2) and (3) can be used :

T = XW (2) B = YT ( 3 )

Here, the LVs (T) are calculated from the predictors (X - spectral dataset) and the weights (W) . The regression coefficients (B) are calculated from the responses (Y) and the LVs. These LVs and coefficients iteratively estimated through a process of weighted least squares regression models until they maximize the explained variance in the responses. The number of LVs is a user-defined parameter. The PLSR model was built using the MATLAB 2019a plsregress function. The optimal number of PLSR LVs was evaluated with the mean squared error of prediction (MSEP) values. The inventors calculated these values for each number of LVs using 5-fold cross-validation (CV) and 100 Monte-Carlo repetitions. Following the setting of the number of LVs, The inventors validated the training model by a test set. The spectral data observations were divided into 80% training and 20% testing. Then the inventors built the PLSR model with 80% of the spectral profiles and tested it by the remaining 20% of the observations. The training and the testing datasets were evaluated with the adjusted correlation coefficient ro °t mean squared error of calibration (RMSEC) for the training, and root mean squared error of prediction (RMSEP) for the testing.

The PLSR model was then tested using a new set of data derived from spectral measurements of porewater samples collected during the column transport experiment. These samples contained unknown ammonium concentrations and, therefore, were optimal for the model validation. The inventors used the 2100nm - 2300nm spectra of each sample, and the regression coefficients computed during the training phase to predict the unknown ammonium concentrations. Then, the ammonium concentrations of the model were compared to standard laboratory analysis and were evaluated with R^dj and RMSE .

An ammonium transport experiment was also performed. A column experiment was conducted to test the applicability of the new methodology for continuous measurements of ammonium in soil. Two columns, 45cm long 29cm diameter, were packed with two soils, the first with with a sandy loam soil (SL) and the second with sandy loam mixed (SLM) with 10% weighted commercial compost (Humus Dovrat . LTD) . The columns were drained by creating a continuous hydraulic gradient with mineral wool that was placed at the bottom the column and into a 0.5m long and 2.54cm diameter drainage pipe (See Fig. 8) . Customized ceramic suction cup and WC sensor (Digital TDT® SDI-12, Accalima) were placed at a depth of 15cm from the top of the soil column. The columns were irrigated daily with one liter (equivalent to 15.8mm) of tap water. Once the daily oscillations in soil WC stabilized, the irrigation water was replaced by lOOOmg L -1 of ammonium solution. The solution made with Merck EMSURE® ammonium chloride (NH 4 Cl) salt mixed with tap water. Soil porewater was collected from the suction cups 3-4 times per day, and the NIR absorption spectrum was optically measured using Cary® 5000 UV-Vis-NIR (Agilent) spectrometer. Acclima TDT soil moisture sensor was used to measure the soil bulk EC and the WC in 15 minutes time resolution using Campbell Sci. datalogger (CR300) . The column's wetting and drainage cycles were designed to mimic irrigated soil' s natural unsaturated conditions with daily volumetric WC fluctuation ranging between 15-30%. In this experiment, the inventors deliberately used sandy loam soils of low clay content to reduce the ammonium ions adsorption mechanism and gain faster breakthrough curves.

All the pH values in the experiments were measured using a pH meter. TOC (Total Organic Carbon) and Total Nitrogen (TN) were estimated by a multi-N/C® 2100s (Analytic Jena AG) TOC/TN analyzer. Ammonium concentrations in the porewater from the 4 agricultural sites were measured using Nessler' s reagent and absorbance read at 425nm wavelength with a TECAN Infinite® M200 spectrometer. The ammonium transport experiment used a Thermo Scientific Dionex™ ICS-5000 ion chromatograph to measure nitrate and nitrite samples.

While some embodiments of the invention have been described by way of illustration, it will be apparent that the invention can be carried into practice with many modifications, variations and adaptations, and with the use of numerous equivalents or alternative solutions that are within the scope of persons skilled in the art , without departing from the spirit of the invention or exceeding the scope of the claims .