*3.1. Energy Characteristics of Psi Swarm Robot Hardware*

In order to bring realism to the simulated experiments and reduce the reality gap data was taken from the PSI swarm robot platform [17] to obtain a power model similar to that produced in [18] for the MarXbot. This model would take an individual robots speed as an input and produce a realistic value for the power consumed at a given time step. As a result the total energy consumed by the swarm across an experiment could be recorded using reports of energy consumption from each swarm member, providing more meaningful data regarding changes of speed within the experiment.

To construct a power model, power consumption was measured using a Keysight N6705B power analyser [19]. Results for power consumption as speed increases were recorded through 10 repetitions and a quartic trend line was fit to the mean of these results, this is illustrated in Figure 2. The resultant equation for power consumption with speed as the input was:

$$P = 1.05 - 7.76 \times 10^{-3} \text{s} + 2.2 \times 10^{-3} \text{s}^2 - 8.89 \times 10^{-5} \text{s}^3 + 1.14 \times 10^{-6} \text{s}^4 \tag{1}$$

where *P* is energy consumption per second (Watts) and s is the current speed of the robot (cm/s). When implementing this equation in the robot swarm simulation, the offset of 1.05 was reduced to 0.05, as it was assumed that most of the offset was due to the base consumption of energy used by robot peripherals. The offset of 0.05 was left to ensure a negative power was never experienced during experiments. The equation was also scaled for the appropriate time frame, ensuring that the correct amount of power per wheel was collected per experiment tick. This equation was then used at each time step to calculate the current energy consumption based on the speed of each individual robot. Energy consumption could then be used to feed into the value of energy efficiency that would be used to measure the fitness of the systems tested in the experiments presented in this paper.

After implementing Equation (1) in the simulation, the analyses of energy efficiencies at different speeds were conducted. In these tests, 20 robots foraged in a simple environment for 500 simulated seconds or until 100 food items were gathered. The average final energy efficiency (food item per unit of energy consumed) from 50 trials at speeds ranging from 1 to 50 cm/s were then plotted (illustrated in Figure 3). Taking the peak value of energy efficiency for a given speed, a value was chosen to act as a baseline for the following experiments.

**Figure 2.** Graph displaying the results of the power consumption of a Psi Swarm robot increasing motor speed gradually. 10 repetitions were taken for these results and a trend line has been fit to the mean of these results and is shown in red.

**\*UDSKRI\$YHUDJH)RRG&ROOHFWHG3HU(QHUJ\&RQVXPHG)RUD6ZDUP RI5RERWV0DLQWDWLQJ6WDWLF6SHHG**

**Figure 3.** Graph showing average food gathered per energy unit consumed in a swarm of 20 foraging robots across 50 trials.

#### *3.2. Hormone Interaction with Motor Speed*

To produce a hormone equation that controlled motor speed in a direct manner and at appropriate speeds given context, it was decided that the two primary influencing factors should be: item demand and the evidence of negative performance.

The presence of frequent collisions and the decay present from failing to achieve task goals have been demonstrated as good indicators of negatives performance [5,7]. Collisions in these cases are identified by the detection of objects by short range proximity sensors, activating the avoidance behaviour, rather than a physical collision between a robot and another entity. These features were therefore used as the first step in the implementation of the new hormone system. The decay would reduce the hormone, and subsequently the speed, to an efficient settling point. Collisions would also reduce the hormone, thus inhibiting the speed of poorly performing robots and limiting their impact on energy consumption.

#### 3.2.1. Demand

'Demand', as a new feature to the virtual hormone system, required the development of a novel formula accounting for: a target number of items to be collected (to be specified before deployment), the allotted time to collect said items, the current collection rate throughout the experiment. Following this, Equation (2) was created:

$$D(t) = \frac{I\_T}{t\_T} - \frac{I\_c + 1}{t} \tag{2}$$

In this equation *D*(*t*) represents the demand function, *IT* is the total number of items desired by the end of the allotted time period, *tT* is the end time for the allotted period, *Ic* is the current number of stored items and *t* is the current time step. Decentralisation is required to remain 'swarm like' during the experiment, therefore the 'demand value' is only accessible to individual robots in the nest. The value is updated as they leave and used as their stimuli throughout their next period of exploration.

Equation (2) models the demand value to fluctuate as items were collected without incurring an exponential increase near the end of the experiment should the swarm only be a few items away from the target collection. By setting the demand as the difference between the required average rate of collection and the current rate of collection, the hormone value and speed could increase with repeated failure to meet target collection rates. This meant that speed would only slightly deviate from the optimal speed of travel. Gradual incrementation in this manner prevented an inefficient burst of speed late in the experiment to compensate for a lack of items collected.

With a function for demand in place, the two Hormone equations were produced (Return Hormone and Speed Hormone, shown respectively in Equations (3) and (4)) to regulate the speeds and behaviours of each robot in the swarm. The hormones produced in these experiments were designed in the same format as [5,7] with *λ* representing decay and *γ* representing the coefficient of stimuli.
