**6. Evaluations of SNN against sensor data stream**

As stated in 5.2.6, the SNNs outperforms the RF algorithm, and the estimation system based on the SNNs is implemented on a Raspberry Pi assuming an actual ECU. The processes Lawn Grass Length/Not Lawn Grass Estimator are shown in **Figure 11**. The sensor data streams are sent in a serial format and are received and saved in the memory of the Raspberry Pi. When the required data size is reached, a set of data is preprocessed. Seven features mentioned in 5.2.4 are extracted according to the sensors, including Horizontal/Vertical Acceleration and Battery Voltage times Duty of Cutting Motor, as shown in **Figure 10**. Then, the Lawn Length/Not Lawn Grass Estimator based on the SNNs estimates that a target area is with Long Lawn Grasses, Short Lawn Grasses, or without Lawn Grasses. Finally, the estimation result is sent to the motor controllers, as shown in **Figure 2(b)**.

#### **Figure 11.**

*Implementation of estimator on ECU.*

#### **Figure 12.**

*Frame Design of Sensor and Estimation Result Records.*

**Figure 12** shows the frames of sensor records and estimation result record. The sensor record has 24 bytes, and it is framed using COBS (Consistent Overhead Byte Stuffing) [23]. This frame has 8-bit Data ID, 13-bit Measurement Data (floating point value), and a 1-bit CRC (cyclic redundancy check) [24] for error detection. The frame of estimation result record consists of COBS, CRC, Data ID, and the estimation result, which is a 1-byte integer (1, 2, or 3) representing the three kinds of estimations.

as a pipeline. This means that the estimation is performed every 2.1 s (i.e., 0.1 + 2), resulting in 1.16-m traveling, which is not a significant issue in the real world. The other cause for the estimation delay is the acceleration of other related processes. Another problem to consider when using the robo-mower in the real world is estimation accuracy. This is because the SNNs are trained with each 3.2-s data frame of sensor data, as shown in **Figure 13(a)**, ensuring that there are no overlaps in the consecutive dataset. The data streams in the pipeline processing have 3.1-s overlap because they are obtained every 0.1 s. The accuracy comparison result is shown in **Table 10**, and the decrement is 1.0 points. Therefore, the estimation accuracy in the

Precision Long Lawn Grasses 98.9 97.2 +1.7

*AI-Based Approach for Lawn Length Estimation in Robotic Lawn Mowers*

*DOI: http://dx.doi.org/10.5772/intechopen.97530*

Recall Long Lawn Grasses 97.6 92.7 +4.9

F-Measure Long Lawn Grasses 98.3 94.9 +3.4

Accuracy 94.0 95.0 ˗1.0

**Estimation Pipeline Non-Pipeline Diff.**

Short Lawn Grasses 88.7 90.8 ˗2.1 Not Lawn Grasses 94.7 97.4 ˗2.7

Short Lawn Grasses 95.0 96.7 ˗1.7 Not Lawn Grasses 89.3 95.5 ˗6.2

Short Lawn Grasses 91.7 92.8 ˗1.1 Not Lawn Grasses 91.9 95.4 ˗3.5

The workload estimation methods for autonomous driving of work vehicles are

proposed and evaluated. A commercial electric robo-mower is used for the

pipeline process is not a major issue.

*Accuracies between pipeline and non-pipeline processes.*

**7. Conclusions**

**139**

**Figure 13.**

**Table 10.**

*Pipeline processing of Lawn length estimation.*

The sensor data records are obtained every 0.1 s. The 32 records, that is, the 3.2-s measurement data are handled in the SNN training, as shown in **Figure 13(a)**. The robo-mower travels with a speed of 0.55 m/s on average [8], and it moves 1.76 m before the 3.2-s sensor data are obtained. Furthermore, if the total processing time for data I/O, motor control, and wheel driving are assumed to be 2 s, the robo-mower will travel 2.86 m if the estimation waits for a 3.2-s data stream. This distance is too large when the robo-mover reaches the boundary between areas with and without lawn grasses. Therefore, as shown in **Figure 13(b)**, the sensor data stream should be treated

## *AI-Based Approach for Lawn Length Estimation in Robotic Lawn Mowers DOI: http://dx.doi.org/10.5772/intechopen.97530*

#### **Figure 13.**

*Pipeline processing of Lawn length estimation.*


#### **Table 10.**

**Figure 12** shows the frames of sensor records and estimation result record. The sensor record has 24 bytes, and it is framed using COBS (Consistent Overhead Byte Stuffing) [23]. This frame has 8-bit Data ID, 13-bit Measurement Data (floating point value), and a 1-bit CRC (cyclic redundancy check) [24] for error detection. The frame of estimation result record consists of COBS, CRC, Data ID, and the estimation result, which is a 1-byte integer (1, 2, or 3) representing the three kinds of estimations.

**Figure 11.**

**Figure 12.**

**138**

*Frame Design of Sensor and Estimation Result Records.*

*Implementation of estimator on ECU.*

*Robotics Software Design and Engineering*

The sensor data records are obtained every 0.1 s. The 32 records, that is, the 3.2-s measurement data are handled in the SNN training, as shown in **Figure 13(a)**. The robo-mower travels with a speed of 0.55 m/s on average [8], and it moves 1.76 m before the 3.2-s sensor data are obtained. Furthermore, if the total processing time for data I/O, motor control, and wheel driving are assumed to be 2 s, the robo-mower will travel 2.86 m if the estimation waits for a 3.2-s data stream. This distance is too large when the robo-mover reaches the boundary between areas with and without lawn grasses. Therefore, as shown in **Figure 13(b)**, the sensor data stream should be treated *Accuracies between pipeline and non-pipeline processes.*

as a pipeline. This means that the estimation is performed every 2.1 s (i.e., 0.1 + 2), resulting in 1.16-m traveling, which is not a significant issue in the real world. The other cause for the estimation delay is the acceleration of other related processes.

Another problem to consider when using the robo-mower in the real world is estimation accuracy. This is because the SNNs are trained with each 3.2-s data frame of sensor data, as shown in **Figure 13(a)**, ensuring that there are no overlaps in the consecutive dataset. The data streams in the pipeline processing have 3.1-s overlap because they are obtained every 0.1 s. The accuracy comparison result is shown in **Table 10**, and the decrement is 1.0 points. Therefore, the estimation accuracy in the pipeline process is not a major issue.
