# Battery-Free Pork Freshness Estimation Based on Colorimetric Sensors and Machine Learning
## 3 Material and Method
### Friis Transmitter Formula  
The power received by RF energy harvesting can be calculated using the Friis transmission formula, which takes into account the aperture area of the antenna.  
As shown in Figure 6, the Friis transmission formula describes the relationship between the transmission power and the reception power when the transmitting and re  
Figure 4: Collinear antenna’s S-parameter.  
Figure 5: Simulation results of collinear antenna’s gain.  
ceiving antennas are separated by a distance of \(r\). It assumes that \(r\) is large enough to satisfy the far-field conditions and calculates the density of the radiation emitted from the transmitting antenna.  
\[S=G\frac{P_{in}G_{t}}{4\pi r^{2}} \tag{4}\]  
When the actual area of the antenna's aperture is \(A_{p}\), and the aperture's valid area is \(A_{e}\)(\(A_{e}<A_{p}\)), the ratio of these two areas is defined as the aperture efficiency.  
\[\eta_{ap}=\frac{A_{e}}{A_{p}} \tag{5}\]  
The valid aperture's area is as follows:  
\[A_{e}=\frac{\lambda^{2}}{4\pi}D \tag{6}\]  
According to the \(S\) of the power density of the receiving antenna, the power of reception is as follows:  
\[P_{r}=SA_{e} \tag{7}\]  
Thus, when Formulas (3) and (4) are used, the power of reception is as follows:  
\[P_{r}=\frac{P_{in}G_{t}}{4\pi r^{2}}\frac{\lambda^{2}}{4\pi}D \tag{8}\]  
The output's power containing \(\eta_{er}\), the receiving antenna's efficiency, is as follows, and is called the Friis transmission formula:  
\[P_{out}=P_{r}\eta_{er}=\frac{P_{in}G_{t}}{4\pi r^{2}}\frac{\lambda^{2}}{4\pi} D_{r}\eta_{er}=\frac{P_{in}G_{t}}{4\pi r^{2}}\frac{\lambda^{2}}{4\pi}G_{r}=( \frac{\lambda}{4\pi r})^{2}G_{t}G_{r}P_{in} \tag{9}\]  
Here, the term \(\left(\frac{\lambda}{4\pi r}\right)^{2}\) is called the free space loss factor, which is caused by the release of energy from the antenna into the entire space in the form of a sphere [16]. Recent studies have focused on the development of omnidirectional antennas that generally have lower benefits of less than 2 dBi.  
Figure 7 depicts the simulated and actual harvesting performance of the proposed antenna at different distances ranging from 0 m to 2 m. According to Equation (9), the power harvested from a dedicated transmitter decreases as the distance increases. In RF systems, a small unit of power in mW is usually expressed in dB format, known as dBm. A total of 10 dBm corresponds to 10 mW, and 20 dBm corresponds to 100 mW. The Friis transmission formula results were sequentially simulated and placed at intervals from the source of RF radiation to ensure that they matched the actual harvesting experiments.  
Figure 6: Friis transmission formula application environment.  
Figure 6 shows a decrease in power as the distance from the transmitter increases, resulting in a negative slope. To minimize the effects of noise and variations in received power due to environmental factors, a moving average filter can be applied to the power measurement data. This filter calculates the average power over a moving window of a certain size, helping to smooth out fluctuations in the measured power. The resulting graph will depict the power received by the receiver after filtering with the moving average filter. Although the graph will still exhibit a negative slope as the distance from the transmitter increases, the variations in the measured power will be reduced, yielding a smoother curve. The experimentally obtained harvested power was found to differ from the simulation value by 10 dBm (on average) per distance unit. This discrepancy arises because the simulation assumes that the transmitter and receiver antennas are 100% conductively and dielectrically efficient. Within a 1.75 m distance, where the RF energy reaches \(-\)5.29 dBm (295 \(\mu\)W), the system can detect the freshness of pork.