*2.4.2 Data acquisition modes*

Soil carbon measurements using the PFTNA mobile system can be done in both static and scanning modes. In static mode, the system is moved to a particular position in the field, and measurements are performed for at least 15 min. Acquired data can be recorded at the end of measurement or periodically at desired time intervals. In scanning mode, the measurement system is continuously moved over the surveyed field, and acquired data are recorded every 30 s (or other previously defined time interval) during certain scanning time (see Section 2.4.4. for detail). Scanning mode is preferable for soil carbon measurement using the PFTNA mobile system since error associated with uneven soil carbon distribution at this scale (1–10 m) is practically

negligible. Along with gamma spectra records, associated geographical coordinates defined by the GPS device are saved as well.

#### *2.4.3 System background measurement and calibration*

After construction, the PFTNA system should be calibrated prior to measuring soil elements. The calibration process consists of 2 parts: system background measurements and determining the dependency of the peak area of interest vs. elemental content in reference samples. This can be done for any soil element, but calibration for soil carbon content measurements are described herein.

System background is defined by peak areas of interest in the gamma spectra when the mobile system is lifted above the ground and away from any large objects. In this case, only system construction materials contribute to the gamma spectra. System background is part of the measured soil spectra and should be subtracted to attain the net soil spectra.

Reference samples for defining calibration dependency should be relatively large. For testing our PFTNA system, four 150 cm 150 cm 60 cm pits with sand-coconut shell mixtures of known carbon content (0, 2.5, 5 and 10 w% of carbon) were used. Calibration measurements should be performed such that errors are negligible compare to field measurements [4].

#### *2.4.4 PFTNA field surveying methodology*

To create soil elemental distribution maps, a number of evenly distributed points should be measured over the surveyed field. These can be represented in soil contour maps with elemental content isolines. Isolines can be created using Deterministic methods (Inverse Distance Weighting, Global polynomial interpolation, Local polynomial interpolation, Radial Basis Functions) or Geospatial methods (Kriging, Areal interpolation, Empirical Bayesian Kriging). Using these methods for surveying a field, there is a consensus that the required number of evenly distributed points (i.e., geographical coordinates and soil elemental content) needed for acceptable analysis is 30, with 20 being the accepted minimum [12]. To attain this set of points, the surveyed field should be virtually divided into approximately equal site areas. Measurements can be done in static or scanning modes. If the field is believed to contain areas with sharp changes in soil elemental content (e.g., an asphalt road passing through the field), the number of sites (and therefore site area) should be adjusted accordingly.

To perform static mode measurements, the PFTNA system should be positioned at the center of each site for at least 15 min. In total, this mode would require a minimum of 5 h of measurement time excluding time required for moving the system between sites.

As previously mentioned, scanning mode measurements are preferable. In this mode, the system is towed within each site for 15 min. The total measurement time is no different than static mode, but the error associated with unevenly distributed soil carbon is absent. To provide the required scanning time per site, the operator should select a suitable speed and path length. To aid the operator, the Android tablet installed in the cabin of towing vehicle traces the scanning path and displays the time spent at each site.

#### *2.4.5 Soil density measurement*

Results from PFTNA soil measurements is the average carbon weight percent in the upper 10 cm soil layer. To express soil carbon in mass units, soil density should also be concurrently measured to a depth of 10 cm (a Troxler 3440 Moisture Density Gauge aids in these measurements). Soil density is measured at five points in each site by the envelope scheme. The central point coincides with the geometric site center, and distance between points is �40 m. Soil density for the site is assumed to be the average of the 5 points.

### **2.5 Data processing**

#### *2.5.1 Primary processing of spectra*

The current FPTNA system has three gamma detectors. From a statistical point of view, processing each spectrum separately (peak areas calculation) and summarizing results of the three detectors is a common way of performing calculations. However, peak area determination from the spectrum of one detector yields relatively large statistical error since the soil carbon signal is relatively small. For this reason, spectra from the three detectors are summed prior to analysis.

During runtime, spectra acquired by each detector and corresponding geographic coordinates are saved at set time intervals. Each record (*r*) of raw data (for the *i*th detector, *i* = 1, 2, 3 detector number) consists of the following: measured INS and TNC gamma spectra *SINS*,*r*,*<sup>i</sup>*ð Þ *Chmeas* , *STNC*,*r*,*<sup>i</sup>*ð Þ *Chmeas* , which are the number of counts in the channel (cnt/ch) versus channel number (*Chmeas*) in the multichannel analyzer; real time of spectra acquisition (*RTINS,r,i*, *RTTNC,r,i*, s); input (absorbed by detector) and output (recorded in spectra) gamma ray count rates (*ICRINS,r,i*, *ICRTNC.r,i*, *OCRINS,r,i* and *OCRTNC.r,i*, cps); clock time of recording of the INS and TNC spectra; and GPS coordinates. Due to each detector having its own energy calibration (correlation between photon energy and channel number), which can vary from day-to-day due to changing environmental conditions (primarily temperature), positions of peak centroids in spectra do not coincide (**Figure 3**).

Spectra of each detector must be brought to one energy calibration to be summarized. To achieve identical energy calibration, the energy calibration for a reference detector of the same type was established under laboratory conditions. To accomplish this by using several known gamma lines, the neutron stimulated gamma spectra (due to both inelastic neutron scattering and thermal neutron capture) of wet and dry soil, and soil-carbon mixes were acquired (see [4]). This resulted in several well-identified gamma peaks in the created spectra (e.g., 0.847 MeV iron peak, 1.779 MeV silicon peak, 2.223 MeV hydrogen peak, 4.438 MeV carbon peak, and 6.129 MeV oxygen peak, 7.63 MeV iron peak). These peak positions (in channel number) were used to create an energy calibration curve for the reference detector; this was a straight line in the range of interest. Spectra measured by other detectors (of the same type) under different conditions can be brought to this calibration line utilizing a shifting procedure (using Igor Pro software [8]).

With this procedure, channel numbers of two well identified peaks, *Ch1,meas* and *Ch2,meas*, in each measured *S Ch* ð Þ *meas* spectrum are defined. Peaks with centroids at ε<sup>1</sup> = 1.78 MeV of 28Si, and *ε*<sup>2</sup> *=* 6.13 MeV of 16O (see **Figure 1**) are used. Next, channels of acquired spectra (*Chmeas*) are shifted to a new position (*Chnew*) (for all INS and TNC spectra) according to the following equations:

**Figure 3.**

*Example of raw and shifted INS spectra of 3 detectors around the 6.13 MeV oxygen peak received during field scanning (559, 561, and 564 identify individual detectors in the PFTNA system).*

$$\text{Ch}\_{new} = \text{Int}[X(\text{Ch}\_{meas})],\tag{1}$$

where

$$X(Ch\_{meas}) = \frac{d\_{ref} - d\_{meas} + b\_{ref} \cdot Ch\_{meas}}{b\_{meas}},\tag{2}$$

$$d\_{r\!f} = e\_1 - b\_{r\!f} \cdot Ch\_{1,r\!f},\tag{3}$$

$$d\_{meas} = \varepsilon\_1 - b\_{meas} \cdot Ch\_{1,meas},\tag{4}$$

$$b\_{r\text{cf}} = \frac{\varepsilon\_2 - \varepsilon\_1}{Ch\_{2,r\text{cf}} - Ch\_{1,r\text{cf}}},\tag{5}$$

$$b\_{meas} = \frac{\varepsilon\_2 - \varepsilon\_1}{Ch\_{2,meas} - Ch\_{1,meas}},\tag{6}$$

*Ch*1,*ref* and *Ch*2,*ref* are the channel numbers for energy *ε*<sup>1</sup> and *ε*<sup>2</sup> in the reference calibration line. Count numbers in the channel with the new channel number *S Ch* ð Þ *new* are calculated as

$$\begin{split} \mathbb{S}(\text{Ch}\_{new}) &= \mathbb{S}(\text{Ch}\_{meas}) - \mathbb{S}(\text{Ch}\_{meas}) \cdot \left\{ \mathbf{X}(\text{Ch}\_{meas} - \mathbf{1}) - \text{Int}[\mathbf{X}(\text{Ch}\_{meas} - \mathbf{1})] \right\} \\ &+ \mathbb{S}(\text{Ch}\_{meas} + \mathbf{1}) \{ \mathbf{X}(\text{Ch}\_{meas}) - \text{Int}[\mathbf{X}(\text{Ch}\_{meas})] \}, \end{split} \tag{7}$$

Shifted spectra of the detectors (**Figure 3**) can be summarized. The shifted spectra are used in the next data processing steps.

#### *2.5.2 Data processing static mode measurements*

For static measurements, the PFTNA system is placed on a particular site where the carbon content must be defined. The required value for spectra acquisition time will depend on the desired statistical error. After spectra acquisition, the gamma spectra are shifted according to procedures described in Section 2.5.1. The net INS spectrum is found as the difference of summarized INS spectra (3 detectors) and summarized TNC spectra (3 detectors). The net INS spectrum (**Figure 4a**) is used for determining silicon (1.78 MeV) and carbon (4.44 MeV) peak areas. Peak areas are calculated by their Gaussian fitting using IGOR software [8]. The 1.78 MeV peak is approximated by one Gaussian (**Figure 4b**), while the 4.44 MeV peak uses two Gaussians (**Figure 4c**) since it contains a silicon transition component.

Received values of silicon (PA1.78*soil*) and carbon (PA4.44*soil*) peaks areas are used in the next steps of data processing for calculating of soil carbon content.

#### **Figure 4.**

*Example of the net INS spectrum (a), and 1.78 MeV and 4.44 MeV peak fittings by one (b) and two Gaussians (c), respectively.*

#### *2.5.3 Data processing scanning mode measurements*

When surveying in scanning mode, the PFTNA system is towed across the field while simultaneously measuring the gamma spectra. Acquired gamma spectra and geographical coordinates of the PFTNA system position are saved every 30 s (�50 m of travel). To ensure even coverage, the surveyed field is virtually divided into sites of approximately equal area. During scanning, the system should be present within each site for at least 15 min; this is required time ensures that error from the combined soil carbon spectrum attributed to each site (see further) not exceed 0.5 w% as explained in Section 2.4.2.

As previously mentioned, creating a map of soil carbon distribution requires a dataset consisting of no less than 20 points of defined elemental contents and corresponding geographical coordinates. To attain this dataset, the field should be virtually divided into the same number of sites. During data processing, the difference between two sequentially recorded spectra and geographical coordinate midpoints are determined, and the differential spectra (midpoints spectra) are assigned to these midpoints. All midpoint spectra having coordinates within a given site will be attributed to this site and after primary processing (as described in Section 2.5.1) will be averaged. The soil carbon content will be determined from this averaged spectrum. The dataset consisting of soil carbon content values and geographical coordinates of corresponding site centers will be used for creating maps.

All acquired spectra are processed on the data processing computer as follows. After spectra shifting procedures, gamma peaks at positions of interest become coincident in each spectrum. The differential spectra between two shifted sequentially recorded spectra for the *i*th detector, Δ*SINS*,*r*,*<sup>i</sup>*ð Þ *Chnew* , *ΔSTNC*,*r*,*<sup>i</sup>*ð Þ *Chnew* , are calculated (channel by channel) as:

$$\begin{aligned} \Delta \mathcal{S}\_{\text{INS},r,i}(\mathcal{C}h\_{\text{new}}) &= \mathcal{S}\_{\text{INS},r+1,i}(\mathcal{C}h\_{\text{new}}) - \mathcal{S}\_{\text{INS},r,i}(\mathcal{C}h\_{\text{new}})\\ \Delta \mathcal{S}\_{\text{TNC},r,i}(\mathcal{C}h\_{\text{new}}) &= \mathcal{S}\_{\text{TNC},r+1,i}(\mathcal{C}h\_{\text{new}}) - \mathcal{S}\_{\text{TNC},r,i}(\mathcal{C}h\_{\text{new}}), \end{aligned} \tag{8}$$

where *SINS,r +* <sup>1</sup>*,i*(*Chnew*), *STNC,r +* <sup>1</sup>*,i*(*Chnew*) and *SINS,r,i*(*Chnew*), *STNC,r,i*(*Chnew*) are the shifted measured gamma spectra for *r* + 1th and *r*th record (in counts per channel) for *i*th detector and INS and TNC spectra, respectively. (Here and hereafter, all actions with spectra are done channel by channel).

The differential spectra in cps/ch (counts per second per channel), Δ*S*<sup>0</sup> *INS*,*r*,*<sup>i</sup>*ð Þ *Chnew* and Δ*S*<sup>0</sup> *TNC*,*r*,*<sup>i</sup>*ð Þ *Chnew* are calculated as:

$$\begin{split} \Delta \mathcal{S}'\_{\text{INS},r,i}(\text{Ch}\_{new}) &= \frac{\Delta \mathcal{S}\_{\text{INS},r,i}(\text{Ch}\_{new})}{LT\_{\text{INS},r+1,i} - LT\_{\text{INS},r,i}}, \\ \Delta \mathcal{S}'\_{\text{TNC},r,i}(\text{Ch}\_{new}) &= \frac{\Delta \mathcal{S}\_{\text{TNC},r,i}(\text{Ch}\_{new})}{LT\_{\text{TNC},r+1,i} - LT\_{r,i}}, \end{split} \tag{9}$$

where *LTINS,r + 1,i*, *LTTNC,r + 1,i* and *LTINS,r,i*, *LTTNC,r,i* are the live time (in s) for the *r* + 1th and *r*th record for the *i*th detector, and INS and TNC spectra, respectively. Live time for each spectrum is calculated as [4]:

$$\begin{aligned} LT\_{\text{INS},r,i} &= RT\_{\text{INS},r,i} \cdot \frac{OCR\_{\text{INS},r,i}}{ICR\_{\text{INS},r,i}}, \\ LT\_{\text{TNC},r,i} &= RT\_{\text{TNC},r,i} \cdot \frac{OCR\_{\text{TNC},r,i}}{ICR\_{\text{TNC},r,i}} \end{aligned} \tag{10}$$

**116**

The two sums of the three differential spectra for each *r*th record, Δ*S*<sup>0</sup> *INS*,*r*ð Þ *Chnew* and Δ*S*<sup>0</sup> *TNC*,*r*ð Þ *Chnew* , were then calculated as:

$$\begin{aligned} \Delta S'\_{INS,r}(Ch\_{new}) &= \sum\_{i=1}^{3} \Delta S'\_{INS,r,i}(Ch\_{new}),\\ \Delta S'\_{TNC,r}(Ch\_{new}) &= \sum\_{i=1}^{3} \Delta S'\_{TNC,r,i}(Ch\_{new}) \end{aligned} \tag{11}$$

The net INS spectrum for each *r*th record Δ*S*<sup>0</sup> *Net*,*INS*,*r*ð Þ *Chnew* was then calculated as the difference between INS and TNC spectra as:

$$
\Delta \mathbf{S}'\_{\text{Net,INS,r}}(\mathbf{Ch}\_{new}) = \Delta \mathbf{S}'\_{\text{INS},r}(\mathbf{Ch}\_{new}) - \Delta \mathbf{S}'\_{\text{TNC},r}(\mathbf{Ch}\_{new}) \tag{12}
$$

The net INS spectra found in this manner will have geographical coordinates of corresponding midpoints. After sorting by site, the average spectra of all net INS midpoint spectra attributed to each site are found. Finally, these average spectra are used for determining soil carbon content for each site. This dataset consisting of soil carbon content and geographical coordinates of corresponding site centers will be used for creating maps.

#### *2.5.4 Calculating soil carbon content*

After primary processing of spectra (Section 2.5.1) and finding the summarized (3 detectors) INS and TNC spectra in counts rate (cps) and net INS spectra (Section 2.5.3), the peak areas of silicon (centroid at 1.78 MeV) and carbon (centroid at 4.44 MeV) can be found using Gaussian fitting procedures (in cps; Section 2.5.2). The background portions of these peaks were found as described in Section 2.4.3.

Carbon content (Cw%) is calculated by Eq. (13):

$$\text{Cont}\_{\text{soil}} = \frac{\left(\text{PA4.44}\_{\text{soil}} - \text{PA4.44}\_{\text{bkg}}\right) - k\_1 \cdot \left(\text{PA1.78}\_{\text{soil}} - \text{PA1.78}\_{\text{bkg}}\right)}{k\_2},\tag{13}$$

where PA4.44*soil*, PA1.78*soil* and PA4.44*bkg*, PA1.78*bkg* are the carbon and silicon peak areas in the soil and system background spectra, respectively, while *k*<sup>1</sup> is a silicon transition coefficient and *k*<sup>2</sup> is the calibration coefficient. These coefficients are defined during system calibration (see Section 2.4.3).

The total carbon content in the upper 10 or 30 cm soil layer of a surveyed field can be defined from PFTNA measurement results. In addition to PFTNA carbon content (in w%) data, field soil density (*d* in kg/m3 ) is required. Determination of field soil density was described in Section 2.4.5.

Total field soil carbon in the 10 cm layer (*TC*10, ton) can be determined according to following equation:

$$TC10 = \sum\_{i=1}^{n} \frac{Cont\_{\text{soil}}}{100} \cdot d\_i \cdot \text{S}\_i \cdot \frac{0.1}{1000},\tag{14}$$

where *n* is the number of sites in a divided field for PFTNA measurements, *Cont*soil *<sup>i</sup>*, and *di*, *Si*are soil carbon content (w%), soil density (kg/m<sup>3</sup> ), and area (m2 ) of the *i*th site, respectively. Area can be taken from the computer software used to divide the field into sites. Given that the PFTNA measurement result is an average soil carbon content for the field, *Cont*soil, then.

$$TC10 = \frac{\overline{Cont\_{soil}}}{100} \cdot \overline{d\_{field}} \cdot \mathbf{S\_{field}} \cdot \frac{0.1}{1000},\tag{15}$$

where *d*field, *S*field are average field soil density (kg/m<sup>3</sup> ) and field area (m<sup>2</sup> ), respectively.

Total carbon content in the upper 30-cm soil layer of the surveyed field (*TC*30, ton) can be defined as:

$$\text{TC30} = \frac{\text{TC10}}{0.55},\tag{16}$$

where the coefficient 0.55 is the ratio of the carbon surface density (g/cm<sup>2</sup> ) in the 10-cm layer to the carbon surface density in the 30-cm layer with an error of �0.10. This coefficient was found to be the average value for different carbon depth profiles for several agricultural fields in Alabama.

#### **2.6 Measurement and data processing software**

The system is supported by three software applications: Scanning App, Navigator App, and Computing App. The data flow within software applications is presented in **Figure 5**.

#### *2.6.1 Scanning App*

The mobile system is managed by the Scanning App. This Windows desktop application was developed in-house using the C# programming language and .Net WPF (Windows Presentation Foundation) technology [13]; this app can run on a consumer-grade computer. The Scanning App runs on the mobile system laptop; application features are presented in **Table 1**.

#### *2.6.2 Navigator App*

The map managing process is mainly performed through the Navigator App. The Navigator App is an Android application developed in-house with Kotlin programming language [16] and can run on a consumer-grade Android tablet or smartphone. Navigator App features are presented in **Table 2**.

#### *2.6.3 Computing App*

After measurement, the spectra from the Scanning App and the field boundary file from the Navigator App must be processed by the Computing App. The Computing App is a Windows desktop application developed in-house using the C# programming language and .Net WPF technology [13]; this app can run on a consumer-grade

*Neutron-Gamma Analysis of Soil for Digital Agriculture DOI: http://dx.doi.org/10.5772/intechopen.102128*

**Figure 5.** *Data flow within software applications.*

computer. The Computing App implements the algorithms in Section 2.5.1–2.5.4 to process static and scanning mode spectra and produce carbon content results. For some mathematical operations on spectra, the Computing App automatically communicates with Igor Pro, which is a scientific data analysis software by WaveMetrics [8]. Additionally, the Computing App contains features presented in **Table 3**.


#### **Table 1.**

*Scanning App features.*


#### **Table 2.**

*Navigator App features.*


#### **Table 3.**

*Computing App features.*

### **3. Results and discussion**

Example soil carbon measurements conducted using the technology described in this chapter are presented in **Figures 6** and **7** and **Table 4**. These measurements were performed on a field in Iowa using the PFTNA mobile system. The field size was 53 ha. Scanning time was 5.5 h.

Sites of equal area and the PFTNA scanning path are shown in **Figure 6**. Soil density measurement points and site centers are also shown. Geographical coordinates of site centers, values of carbon gamma peak areas, calculated values of soil carbon weight percent, and soil carbon content in the 10 and 30 cm layers for each site are presented in **Table 4**. The total carbon weight in the 10 and 30 cm layers of this field and the average carbon weight per ha are also shown in this table. The average carbon weight percent for this field was 3.45 w% with a variation (STD) of 0.44 w%. This variation is larger than the average error of soil carbon weight percent in each site, indicating that changes of carbon weight percent are present within the field. The carbon distribution map for this field was created using Local Polynomial Interpolation (Deterministic methods) in ArcMap based on Cw% site data (**Figure 7**). The insignificant change in carbon content from 4 (east border) to 3 w% (west border) can be seen on this field map. Knowledge of average values and carbon content changes across a field can be very useful in modern agricultural practices. Data regarding total carbon content in the 10 and 30 cm layers of this field can be useful for agricultural practice and ecological assessments.

Based on the discussed example and previous experiments, the equipment for implementing Pulsed Fast/Thermal Neutron Analysis of soil carbon content under field conditions was demonstrated to be reliable. Such measurements return soil carbon contents within a relatively short time for large fields (53 ha for 5.5 h), and accuracy of measurements were no worse than traditional chemical analysis.

**Figure 6.**

*Map showing field and site borders, scanning path, carbon content values, and site soil densities.*
