## 2 The RB Controls
### Control the RB for Providing the Designated Sunlight Set by the Operator  
Let \(optLux\) denote the designated light intensity set by the operator. \(optLux\) is set depending on the plants inside the farm.  
This subsection addresses autonomous RB controls, so that the set sunlight intensity \(optLux\) can be provided for the plants inside the farm. We control the RB periodically, so  
Figure 1: An illustration of a long greenhouse structure (top view). Two RBs are installed on one side of a long greenhouse.  
Figure 2: An illustration of the proposed RB control system. The sunlight is depicted as an arrow. The RB controls the light onto the plants inside the farm. The light reflects inside the farm, since reflective films are installed inside the farm. The RB is depicted with a red line segment.  
that the designated sunlight intensity can be provided for plants inside the farm. In order to obtain the RB angle at which the desired light intensity is obtained, we utilize the light control algorithm in Algorithm 1.  
In Algorithm 1, \(angle\) denotes the current RB angle. As we initialize Algorithm 1, we initialize \(IterationCount=0\). At every \(\epsilon\) minutes, the RB changes its angle with step size \(\Delta\). Let \(arg(m_{lux})\) denote the average of the mean light intensity \(m_{lux}\), while the RB stays still for \(\epsilon\) minutes. Here, the RB stays still for \(\epsilon\) minutes, in order to obtain a stabilized intensity measurement.  
```
Measure the light intensity \(avg(m_{lux})\), while staying still at the current RB angle for \(\epsilon\) minutes; if\(avg(m_{lux})\geq optLux+t_{h}\)then \(angle=angle-\Delta\); endif if\(avg(m_{lux})\leq optLux-t_{h}\)then \(angle=angle+\Delta\); endif if we find a RB angle, such that \(\|avg(m_{lux})-optLux\|<t_{h}\) under Algorithm 1 or \(IterationCount\geq Q\)then  Maintain the RB angle for \(S\) minutes until moving the RB under Algorithm 1;  IterationCount = 0; else  Re-run Algorithm 1;  IterationCount = IterationCount + 1; endif
```  
**Algorithm 1** RB controls for providing the designated sunlight intensity \(optLux\) set by the operator  
Suppose that Algorithm 1 ends and that the difference between the measured light intensity and \(optLux\) is smaller than a certain threshold, say \(t_{h}\). As time goes on, the Sun light direction changes, since the earth rotates continuously. Thus, we maintain the set RB angle for \(S\) minutes, until moving the RB again using Algorithm 1. In our experiments, we set \(S\) as 10 min. In practice, we can set a large \(S\), such as one hour.  
In practice, running Algorithm 1 may not provide the light intensity which is sufficiently close to the desired light intensity. This case may happen due to various environmental conditions, such as temporary blocking of Sun light due to cloud.  
Suppose that Algorithm 1 ends and that the difference between the measured light intensity and \(optLux\) is larger than \(t_{h}\). In this case, we re-run Algorithm 1, in order to find the optimal RB angle again. This process iterates until the difference between the measured light intensity and \(optLux\) is smaller than \(t_{h}\). In Algorithm 1, \(IterationCount\) indicates how many times this algorithm re-runs iteratively. As we re-run Algorithm 1, \(IterationCount\) increases by one.  
In order to avoid the case where Algorithm 1 keeps iterating infinitely, iteration of Algorithm 1 stops after Algorithm 1 runs more than \(Q>1\) times. Here, \(Q\) is a constant set by the farm operator. In experiments, we set \(Q=3\). In this way, we can avoid infinite movements of the RB.