## 2 Materials and Methods
### Principle of DMAS-Based Localization Method for Anomalous Moisture Region in Grain Piles  
This paper employed a digital beamforming technique based on the DMAS algorithm to localize regions of anomalous moisture content within the grain pile. Data acquisition was performed using an extended multi-static approach: \(N\) transmitting antennas in the  
Figure 1: Detection system for detecting anomalous moisture regions in the grain pile and the data acquisition and processing unit. Red arrows indicate electromagnetic wave emission, while blue arrows represent the reception of electromagnetic waves containing information about hotspots (areas of anomalous grain moisture).  
antenna array emitted signals in succession, while the scattered signals were received by all \(M\) receiving antennas. Upon completion of the transmission cycle by all elements, a total of \(N\times M\) scattered signals were recorded. Additionally, for layouts with cross-shaped structures, the number of scattered signals was \(2\times M/2\times N/2\).  
To enhance detection accuracy, this experiment necessitated the reduction of environmental interferences, as the amplitude significantly exceeded that of the response from anomalous regions. These environmental interferences primarily originate from internal metallic structures, foreign matter in the grain, such as insects and pebbles, and biological entities in the surrounding test environment. The presence of these extraneous elements affects the collected scattered field signals.  
Consequently, we proposed a calibration method for the scattered field data, \(y^{sct}\). The scattered field data collected under conditions of completely dry grain was utilized as background data \(y_{inc}\). Thus, the calibrated scattered field data could be expressed as \(y^{sct}=y^{inc}-y^{mv}\). This calibration method was readily implementable, as the condition of completely dry grain could be conveniently achieved and maintained for reference measurements. For measurements involving diverse grain varieties and varying test environments, recalibration using a consistent methodology is imperative. This process includes the separate acquisition of background and scattered field data for each scenario.  
The algorithm principle is as follows: First, calculate the round-trip path length from each transmitting antenna to a focal point in the grain and then to the receiving antenna, converting this to a time delay. The calculation considers all media traversed during the round trip, computing signal propagation velocity in each medium by assuming the relative dielectric constant at the excitation pulse's center frequency. Time shifts are applied to the processed scattered signals based on the calculated time delays, followed by paired multiplication and summation, with the output as \(y^{*}(t)\). Finally, the focal point response \(r(i)\) is obtained by integrating over a time window \(W\)[22]:  
\[r(i)=\int_{0}^{W}y^{*}(t)dt. \tag{1}\]  
The time window is \(W=a\Delta t\), where a represents the number of time steps in the finite difference time domain (FDTD) method. The paired multiplication refers to the calculation of spatial cross-correlation between all received signals. Specifically, this is achieved by computing the signed geometric mean values between two adjacent signals, which is equivalent to a new signal. Subsequently, all equivalent signals are summed, resulting in the following expression [22]:  
\[y^{*}(t)=\sum_{i=1}^{N_{s}-1}\sum_{j=i+1}^{N_{s}}sign\Big{(}y_{i}^{sct}(t)y_{j }^{sct}(t)\Big{)}\times\sqrt{\Big{|}y_{i}^{sct}(t)y_{j}^{sct}(t)\Big{|}}, \tag{2}\]  
where, \(N_{s}\) represents the number of the recorded scattered signals.