# Swarming Behavior Emerging from the Uptake-Kinetics Feedback Control in a Plant-Root-Inspired Robot
## 2 Materials and Methods
### Uptake-Kinetics Feedback Control  
At each time step, each root takes a decision independently from the other and with only the knowledge of its internal state and environmental perception. Therefore, each robotic root is an autonomous agent that repeatedly performs steps in the following order:  
1. Update of internal state and uptake-kinetics parameters;
2. Perception of the environment;
3. Uptake of nutrients;
4. Nutrients sent to shoot;
5. Evaluation of growing direction;
6. Growth. As the shoot is a collector and distributor of nutrients (satisfying _Property_ 7), when it receives all the nutrients from each agent, it sends an amount of nutrients back in proportion to the request received from the root. In fact, together with the uptake, each root also makes a request to the shoot for each nutrient that corresponds to the free internal memory. The request is expressed by the root as a percentage of free memory over the storeCapacity. The feedback control inspired by the uptake-kinetics of plant roots, called the uptake-kinetics feedback control, is summarized in Figure 3.  
Figure 2: An example of the virtual environment. Nutrients gradients are visualized over three separated spaces, one for each nutrient (N: nitrate, K: potassium, P: phosphorus) where the centers are, respectively, \(C_{N}=(3,2,-4)\), \(C_{K}=(-3,-2,-1)\), \(C_{P}=(3,1,-5)\). Roots move in the environment where these three gradients coexist. At the beginning of each loop, the root updates the internal status with the nutrients received by the shoot and then proceeds to update the uptake-kinetics parameters accordingly (Step 1). New \(I_{max}\) and \(K_{m}\) are obtained as a function of the internal quantity of each nutrient (_Property 2_) with a linear transformation. Coefficients of transformation functions and fitting parameters are reported in Table 1.  
Since the variation of \(I_{max}\) reflects the variation in the internal state of nutrients, it can be considered as an estimator of nutrient priorities. In fact, when the internal state of a nutrient increases, its \(I_{max}\) decreases, indicating that this nutrient needs to reduce its uptake because of the increase in its internal availability. We mapped \(I_{max}\) directly into a priority:  
\[P=\frac{1.1\times I_{max}{}^{2}}{I_{max}^{+}{}^{2}}-0.1, \tag{6}\]  
with \(I_{max}^{+}\) the maximum value of \(I_{max}\) (Table 2) obtained from the literature [34, 45]. In Equation (6), we used a quadratic function to speed-up the priority adjustment. \begin{table}
\begin{tabular}{c c c c c} \hline  & \(p_{1}\) & \(p_{2}\) & **Points Used for Fitting** \\ \hline
**Transformation** & N & \(-6.992\times 10^{-3}\) & \(3.672\times 10^{-6}\) & \((0,3.672\times 10^{-6})\), \((5\times 10^{-4}\), \(1.76\times 10^{-7})\) \\
**function for \(I_{max}\)** & K & \(-6.992\times 10^{-3}\) & \(3.672\times 10^{-6}\) & \((0,3.672\times 10^{-6})\), \((5\times 10^{-4}\), \(1.76\times 10^{-7})\) \\ \((TF\_{max})\)\(y=p_{1}\times x+p_{2}\) & P & \(-6.992\times 10^{-3}\) & \(2.125\times 10^{-7}\) & \((0,3.672\times 10^{-7})\), \((5\times 10^{-4}\), \(1.76\times 10^{-8})\) \\ \hline
**Transformation** & N & \(-8.4\times 10^{-4}\) & 61 & \((0,61)\), \((2\times 10^{-4}\), \(19)\) \\
**function for \(K_{m}\)** & K & \(-8.4\times 10^{-4}\) & 61 & \((0,61)\), \((2\times 10^{-4}\), \(19)\) \\ \((TF\_{K_{max}})\)\(y=p_{1}\times x+p_{2}\) & P & \(-8.4\times 10^{-4}\) & 6.1 & \((0,6.1)\), \((2\times 10^{-5}\), \(1.9)\) \\ \hline \end{tabular}
\end{table} 
Table 1: Transformation functions. Coefficients of the linear functions used to obtain the parameters \(I_{max}\) and \(K_{m}\) of the uptake rate, given the internal concentration of each nutrient. The last column reports the points used for polynomial fitting.