Precision Location-Aware and Intelligent Scheduling System for Monorail Transporters in Mountain Orchards

: This study addressed the issue of the real-time monitoring and control of the transporter in a mountain orchard terrain characterized by varying topography, closed canopy, shade, and other environmental factors. This study involved independent research and the development of a series of electric monorail transporters. First, the application requirements of “Where is the monorail transporter?” were examined, and an accurate location-aware method based on high-frequency radio frequency identiﬁcation (RFID) technology was proposed. In addition, a location-aware hardware system based on STM32 + RFID + LoRa was designed to determine the position of the monorail transporter on a rail. Second, regarding the application requirements of “Where is the monorail transporter going?”, a multimode control gateway system based on Raspberry Pi + LoRa + 5G was designed. An Android mobile terminal can obtain operational information about the transport plane in real time through the gateway system and remotely control its operation. The track-changing branch structure enables multimachine autonomous intelligent avoidance. Based on the experimental results of monorail transporter positioning in mountain orchards under various typical terrains, such as ﬂat surfaces, turning paths, and uphill/downhill slopes, the road section average relative error of the 7ZDGS–250-type monorail transporter was 1.27% when the distance between benchmark positioning tags was set at 10 m on both ﬂat and turning roads, and that of the 7ZDGS–300-type monorail transporter was 1.35% when the distance between benchmark positioning tags was set at 6 m uphill/downhill. The road section relative error of the 7ZDGS–250-type monorail transporter was 21.18%, and that of the 7ZDGS–300-type monorail transporter was 9.96%. In addition, the experimental results of monorail transporter communication control showed that the combination of the multimode control gateway control system and track-changing branch structure can achieve multimachine cooperation and autonomous avoidance function, ensuring that multiple monorail transporters can operate simultaneously without collision. The ﬁndings of this study establish the communication link of “monorail transporter-gateway system-control terminal” and form a precise positioning and real-time control scheme applicable to the operating environment of monorail transporters, thereby improving the intelligence and safety of mountain orchard monorail transporters.


Introduction
Hilly and mountainous areas are essential production bases for grain and unique agricultural products.In China, for example, the amount of arable land in 2022 reached 168,695 kilo hectares [1], with hilly and mountainous areas accounting for one-third of it [2].However, these areas have varied terrains and rugged, narrow roads, making it difficult for most agricultural machinery and equipment designed for flatlands to pass through and function effectively.The problems of "no machine available" and "no machine good" are prominent [3].This is particularly notable in the transportation of supplies during production, where the traditional approach relies on labor or animal transport, leading to high labor intensity, high transport cost, low operational efficiency, and increased safety hazards [4].The monorail transporter has a smooth operation and strong climbing ability, and is the mainstream machine for mechanized transport operations in mountain orchards [5].The transporter can be divided into double track [6] and single track [7] based on the layout of the tracks and the condition of the power drive.The transporter mainly includes traction [8], internal combustion engine-driven [9], or electric [10] power drives.
Monorail transporters have received significant attention in the industry because of their advantageous features, such as flexible track-laying and a small turning radius [11].In previous studies, the author's team has independently developed a series of electrically operated monorail transporters [12].Among them, the 7ZDGS-250-type monorail transporter can carry a maximum load of 250 kg, travel at a speed of 0.53 m/s, and climb slopes with a maximum angle of 30 • while, the 7ZDGS-300-type monorail transporter can handle a maximum load of 300 kg, travel at a speed of 0.94 m/s, and climb slopes with a maximum angle of 36 • .The mechanical theory and technical application of monorail transporters have progressively matured.However, with the increasing scale of track laying, the monorail transporter faces challenges during the driving process, such as changes in terrain within mountain orchards, closed canopies, and severe shade.These environmental factors make real-time monitoring and control difficult.Thus, the transporter should be equipped with autonomous operation and navigation capabilities, aligning with the intelligent agriculture development trend [13].To achieve this goal, two fundamental questions must be addressed: "Where is the monorail transporter?" and "Where is the monorail transporter going?" The primary objective of addressing the "Where is the monorail transporter?"problem is to determine the real-time on-track position of the monorail transporter.Currently, the universal positioning system for agricultural equipment mainly adopts satellite navigation [14,15], light detection and ranging (LiDAR) [16,17], and machine vision [18].However, the positioning signal propagation of satellite navigation is affected by terrain elevation changes, tree canopy shading, and other factors, resulting in low positioning accuracy, making it challenging to apply directly to a mountain orchard operating environment.LiDAR and machine vision fall under the simultaneous localization and mapping (SLAM) field category.These technologies require scanning in advance to build a map model, which is then combined with environmental parameters to achieve positioning.However, the dynamic nature of ground vegetation and tree canopy in the orchard production process makes it difficult to maintain a static map model.In addition, the cost of implementing this technology is high, making it unsuitable for mountainous orchard environments.
The primary objective of addressing the "Where is the monorail transporter going?" problem is to effectively communicate with and control the monorail transporter in real time, which can be categorized in the context of IoT in agriculture.Common IoT communication technologies [19] mainly use Wi-Fi [20], Zigbee [21], LoRa [22], Bluetooth [23], and 5G [24].Agricultural equipment communication requires low power consumption, low cost, and short response time.Compared to other communication technologies, LoRa communication has comprehensive range coverage, low application cost, convenient networking, and can generally support thousands of nodes.Through the communication experiment in the orchard environment with a closed canopy, the measured communication distance between two Lora communication modules can reach 400 m without relay nodes.Therefore, LoRa is more suitable for the operating environment of mountain orchards.
In this study, a comprehensive analysis is performed on a self-developed series of electric monorail transporters.This study focused on two main aspects.First, we propose an accurate positioning method based on high-frequency radio frequency identification (HF RFID) technology.This solution solves the problem of "Where is the monorail transporter?"through the design of a location-aware hardware system based on STM32 + RFID + LoRa to determine the monorail transporter's on-track position in real time.Second, a multimodal control gateway system was designed based on Raspberry Pi + LoRa + 5G, allowing an Android mobile terminal to obtain real-time information about the operation of the monorail transporter and remotely control its operation status through the gateway system, thus solving the problem of "where is the monorail transporter going?".In addition, this study combines the track-changing branch structure to enable the autonomous and intelligent avoidance of multitransporters.
This study is organized as follows: Section 2 describes the RFID location-aware method and feasibility analysis of the monorail transporter, as well as the design of the location-aware hardware system; Section 3 describes the hardware design of the multimode control gateway system, software control process, autonomous avoidance strategy of the monorail transporter, and software control process of the mobile client.The experiments on positioning and communication control of the monorail transporter of the mountain orchard and the analysis of their results are elaborated in Section 4; and finally, Section 5 summarizes the study.

Accurate Location-Aware Method Based on High-Frequency Radio Frequency Identification Technology
The operating frequency of HF RFID is 13.56 MHz.Reader and tag communication is characterized by a fast data transmission rate and a close effective reading distance [25].This study used this property to deploy double readers (R 1 and R 2 ) in the nose of a monorail transporter with distance D R and benchmark positioning tag sets (T a , T b and etc.) on the trackside with distance D T (Figure 1).
The process of determining the on-track position of the monorail transporter is described as follows: when the monorail transporter passes the benchmark positioning tag, the double readers sequentially identify the benchmark positioning tag T n (n = a, b, . ..) to obtain the on-track position of the monorail transporter, P n (n = a, b, . ..), and the time difference of identifying the benchmark positioning tag T n , ∆t.The monorail transporter's instantaneous velocity V n (n = a, b, . ..) was calculated using Equation (1) to characterize the monorail transporter's average velocity V n (n = a, b) between the two benchmark positioning tags T n and T n+1 .Double readers identified the benchmark positioning tag Tn and then timed it to obtain the traveling time t n (n = a, b, . ..) of the monorail transporter between the two benchmark positioning tags T n and T n+1 , and Equation ( 2) was used to calculate the traveling distance S n (n = a, b, . ..) of the monorail transporter between the two benchmark positioning tags T n and T n+1 .Equation (3) was used to calculate the monorail transporter's real-time on-track position P.
S n = V n * t n (2)

Feasibility Analysis of Radio Frequency Identification Location Methods for Monorail Transporter
The first prerequisite for the feasibility of the monorail transporter RFID positioning method is that double readers can correctly read the baseline positioning tag data while the monorail transporter is traveling, and the smaller the distance D R between R 1 and R 2 , the more accurate the monorail transporter's instantaneous traveling speed V n .However, because HF RFID uses a fixed communication band, the near-neighboring R 1 and R 2 inevitably encounter the reader collision interference problem when reading the same tag data.At this point, the tag fails to communicate because it cannot correctly parse the readers' query signal [26].In this study, a double-reader interlocking anti-interference strategy was designed to address this problem: The first reader along the traveling direction of the monorail transporter is activated in priority, and the second reader is closed and activated immediately when the reader correctly reads the tag data.Only one reader is activated at any time by controlling the double readers to take turns starting and stopping.
The key to the double-reader interlocking anti-jamming strategy is the existence of a start initialization process for reader start-up, which requires some data processing time, T data .Thus, a lower limit value for the distance d between R 1 and R 2 must exist to satisfy this time requirement.
To verify the above ideas, an RFID model (MFRC522, ZLG, Guangzhou, China) was identified that supports the ISO 14443A/MIFARE protocol [27], with an adequate reading distance of 6-10 cm and, communication modes such as Serial Peripheral Interface (SPI), inter-integrated circuit, and universal asynchronous receiver/transmitter. Second, the double readers were placed relative to each other at a distance of 12 cm (Figure 2), and 20 matching tags were randomly selected; each tag was placed at the center of the double readers, and the time difference in reading tag data was recorded by starting and stopping the reader in turn, which was repeated 20 times.Approximately 400 sets of time-difference data were obtained, with the statistical results of 3.19 ± 0.01 ms, which can characterize the data processing time T data to some extent.If the monorail transporter's maximum traveling speed is 0.94 m/s, and the total value of the reading time difference is 3.20 ms, the distance D R should be approximately larger than 0.30 cm.Considering the complexity of the operating environment of the actual application, the distance D R was located at 5 cm in this study, which is an order of magnitude higher than the lower limit value to avoid the problem of RFID collision interference to the greatest extent possible.traveling speed is 0.94 m/s, and the total value of the reading time difference is 3.20 ms, the distance DR should be approximately larger than 0.30 cm.Considering the complexity of the operating environment of the actual application, the distance DR was located at 5 cm in this study, which is an order of magnitude higher than the lower limit value to avoid the problem of RFID collision interference to the greatest extent possible.

Design of Location-Aware Hardware System Based on STM32 + RFID + LoRa
For the application requirement analysis of "Where is the monorail transporter?", the transport location-aware hardware system should have the functions capable of locationaware, calculating, and transmitting on-track position information.Therefore, the control logic of the location-aware hardware system designed in this study used the HF RFID to sense the benchmark positioning tag's position information deployed on the trackside, an embedded STM32 microcontroller to process the RFID data to obtain the on-track position

Design of Location-Aware Hardware System Based on STM32 + RFID + LoRa
For the application requirement analysis of "Where is the monorail transporter?", the transport location-aware hardware system should have the functions capable of locationaware, calculating, and transmitting on-track position information.Therefore, the control logic of the location-aware hardware system designed in this study used the HF RFID to sense the benchmark positioning tag's position information deployed on the trackside, an embedded STM32 microcontroller to process the RFID data to obtain the on-track position information of the monorail transporter, and a low power LoRa communication module to realize the information transmission function.The design of the location-aware hardware system based on STM32 + RFID + LoRa is shown in Figure 3, and the fabricated circuit board is shown in Figure 4.The main functional modules of the location-aware hardware system are as follows: • HF RFID sense data module: The system uses an MFRC522-type RFID reader with a matching passive tag (for performance parameters, see Section 2.1).Readers R1 and The main functional modules of the location-aware hardware system are as follows: • HF RFID sense data module: The system uses an MFRC522-type RFID reader with a matching passive tag (for performance parameters, see Section 2.1).Readers R 1 and R 2 use the interlocking anti-interference strategy to solve the RFID collision interference problem and combine it with a hardware timer to obtain double readers to read the same benchmark positioning tag's data time difference; double readers through the SPI channel to provide real-time sensing data for the main control chip.

•
Embedded STM32 data computing module: The main control chip of the system is a 32-bit microcontroller STM32F103RCT6 (ST Microelectronics, Muar, Malaysia) based on an ARM Cortex-M3 core that supports multiple communication methods and timer configurations, and operates at a clock frequency of 72 MHz.The power supply uses a Direct Current (DC) 12V/12Ah lithium polymer battery and provides 5/3.3 V working voltage through a DC regulator circuit.The main control chip determines the position of the monorail transporter on the track in real time based on RFID real-time sensing data using the proposed positioning method, controls the motor of the monorail transporter using the contact relay (HFD4/5, Hongfa, Xiamen, China), and monitors the motor operating status in real time through the I/O ports.

•
Data storage and LoRa communication module: The main control chip of the system reads the benchmark positioning tag data in the flash memory (W25Q64, Winbond, Taiwan, China) through the SPI channel and stores the determined on-track position of the monorail transporter in real time, addressing the problem of data loss by power-down.In addition, the system uses a LoRa serial communication module (E22-400TBH-01, Ebyte, Chengdu, China) to upload the measured on-track monorail transporter positions, traveling speeds, historical paths, and other operational statuses to the multimode control gateway system.It receives real-time monorail transporter forward/backward, stop, and other control commands from the gateway system.

Design of Multimode Control Gateway System
For the application requirement analysis of "Where is the monorail transporter going?" the multimode control gateway system should have the functions of remotely obtaining the operation status of the monorail transporter, issuing control instructions in real time based on the operation tasks, and realizing the safe scheduling of multiple machines.The monorail transporter operation status is sent to the gateway system in real time after being determined by the location-aware hardware system.In contrast, the mobile client releases the monorail transporter control instructions subscribed by the gateway system to the cloud server.The architecture of the multimode control gateway system designed in this study is shown in Figure 5, and the design diagram and system object are shown in Figure 6.
The main functional modules of the multimode control gateway system are as follows: • Raspberry Pi 4B central control module: The central control module of the gateway system adopts the Raspberry Pi 4B board (Raspberry Pi, UK) based on the BCM2711 chip, equipped with a 64-bit 4-core processor with a central frequency of 1.5 GHz, and Python based on the transplanted Linux operating system to complete the development of communication functions.The power supply is made of a high-energy-density DC12V/12Ah lithium polymer battery.It adopts an isolated DC-DC small power step-down power module (DM41-20W1205B1, Ebyt, Chengdu, China) to effectively and consistently suppress the spike voltage and output 5 V working voltage.

•
LoRa communication module: The gateway system LoRa communication module is consistent with the configuration of the location-aware hardware system, and the working frequency band is 433.125 MHz.Based on the coordinated operation of multiple transporters, after polling by the gateway system, the location-aware hardware system of each monorail transporter uploads its operation status information using the LoRa peer-to-peer transmission mode, and the gateway system releases monorail transporter control and scheduling commands using the LoRa peer-to-peer transmission mode.

•
5G communication module: The gateway system adopts a 5G module based on the RG500U-CN module (Quectel, Hefei, China), which can automatically adapt to 5G NSA and SA dual-mode networks and is also compatible with 4G/3G.The Gigabit Ethernet port (RJ-45) of the controller module connects to the 5G communication module to access the Internet through a CAT-6 cable, and the system uses the Message Queuing Telemetry Transport [28] (MQTT) protocol to facilitate information interaction with the cloud server.

•
MQTT cloud server: The controller module uses Mosquitto to deploy the MQTT cloud server, which is responsible for forwarding the communication data between the mobile client and multiple equipment.In addition, it adopts Phddns [29] intranet penetration to map the intranet ports to the cloud, converting the private IP address of the intranet into the legal public IP address, realizing the domain name-based Internet access of the LAN application, and applying the MQTT protocol to realize the information interaction with the mobile client.
re 2023, 13, x FOR PEER REVIEW 8 of 23

Design of Multimode Control Gateway System
For the application requirement analysis of "Where is the monorail transporter going?" the multimode control gateway system should have the functions of remotely obtaining the operation status of the monorail transporter, issuing control instructions in real time based on the operation tasks, and realizing the safe scheduling of multiple machines.The monorail transporter operation status is sent to the gateway system in real time after being determined by the location-aware hardware system.In contrast, the mobile client releases the monorail transporter control instructions subscribed by the gateway system to the cloud server.The architecture of the multimode control gateway system designed in this study is shown in Figure 5, and the design diagram and system object are shown in Figure 6.The main functional modules of the multimode control gateway system are as follows: • Raspberry Pi 4B central control module: The central control module of the gateway system adopts the Raspberry Pi 4B board (Raspberry Pi, UK) based on the BCM2711 chip, equipped with a 64-bit 4-core processor with a central frequency of 1.5 GHz, and Python based on the transplanted Linux operating system to complete the development of communication functions.The power supply is made of a high-energy-

Multimode Control Gateway System Workflow
Figure 7 shows the workflow diagram of the gateway system.After the gateway system starts running, it first performs the start operation, creates the equipment dictionary for storing the job status information of multiple equipment, and creates the queues used for process communication, which are the LoRa data downstream queue, LoRa data upstream queue, MQTT data downstream queue, and MQTT data upstream queue.Secondly, based on the Linux system, Python language for multitasking programming, creating two task processes and two sub-threads, namely LoRa process, MQTT process, polling thread, and scheduling thread.The processes and threads work together in the system to obtain transmitter operation status information and execute the scheduling commands, ensuring efficient operation of the transmitter.
thread subscribes to the scheduling commands of the MQTT cloud server in real time and writes them into the MQTT data downlink queue.The MQTT uplink thread reads the job status information of the monorail transporter in the MQTT data uplink queue and publishes the data to the MQTT cloud server.
The polling thread sends commands to the LoRa data downstream queue at regular intervals to poll the monorail transporter job status information in the self-organizing network.Then, it waits to read the monorail transporter job status information into the LoRa data upstream queue and writes it into the equipment dictionary and MQTT data upstream queue.It sends the instruction to the avoidance algorithm, which performs avoidance path planning by combining the operational status information of each monorail transporter in the equipment dictionary.The equipment priority obtains the avoidance scheduling instruction and writes the scheduling instruction to the LoRa data downstream queue, while also monitoring and updating the subsequent operation status information of each monorail transporter and scheduling instruction in real time.Two subthreads are created in the LoRa process: the LoRa downlink and uplink threads.The LoRa downstream thread reads the scheduling commands in the LoRa data downstream queue in real time and sends them to the monorail transporter point-to-point using the LoRa communication module.The LoRa upstream thread reads the data in the First Input First Output (FIFO) data buffer of the LoRa communication module in real time and writes the data into the LoRa data upstream queue.Two subthreads are created in the MQTT process: the MQTT downlink and uplink threads.The MQTT downlink thread subscribes to the scheduling commands of the MQTT cloud server in real time and writes them into the MQTT data downlink queue.The MQTT uplink thread reads the job status information of the monorail transporter in the MQTT data uplink queue and publishes the data to the MQTT cloud server.

Transporters Avoidance Strategies Combined with the Track-Changing Branch Structure
The polling thread sends commands to the LoRa data downstream queue at regular intervals to poll the monorail transporter job status information in the self-organizing network.Then, it waits to read the monorail transporter job status information into the LoRa data upstream queue and writes it into the equipment dictionary and MQTT data upstream queue.It sends the instruction to the avoidance algorithm, which performs avoidance path planning by combining the operational status information of each monorail transporter in the equipment dictionary.The equipment priority obtains the avoidance scheduling instruction and writes the scheduling instruction to the LoRa data downstream queue, while also monitoring and updating the subsequent operation status information of each monorail transporter and scheduling instruction in real time.

Transporters Avoidance Strategies Combined with the Track-Changing Branch Structure
To ensure the efficient coordination and safe operation of multiple monorail transporters, this study proposed a monorail transporter avoidance strategy combined with a track-changing branch structure [30], in which the track-changing branch structure was designed independently by the author's team in previous work.It can communicate with the multimode control gateway system in real time.The design and physical objects are shown in Figure 8.To ensure the efficient coordination and safe operation of multiple monorail transporters, this study proposed a monorail transporter avoidance strategy combined with a track-changing branch structure [30], in which the track-changing branch structure was designed independently by the author's team in previous work.It can communicate with the multimode control gateway system in real time.The design and physical objects are shown in Figure 8.The avoidance strategy of the monorail transporter based on the link of the "monorail transporter-gateway system-track-changing branch structure" is summarized as follows: 1.The avoidance waiting area was set up at each branch of the track-changing branch structure (Figure 9); 2. The gateway system detects the operation status information of each monorail transporter in real time and calculates a safe avoidance control strategy using the avoidance algorithm based on the operation priority of the monorail transporters when there is a risk of collision between the detected monorail transporters; 3. Using the results of the avoidance strategy, the gateway system controls the trackchanging branch structure to change the track direction, ensuring that monorail transporters with low operational priority go to the nearest avoidance waiting area and give the right of way of the track to monorail transporters with high operational priority; 4.During the avoidance process, the gateway system continuously detects the operation status information of each monorail transporter to ensure that all monorail transporters cooperate to avoid conflicts and optimize the avoidance path.If a new risk of collision emerges, the gateway system will devise a new avoidance plan for the monorail transporters to avoid the collision.The avoidance strategy of the monorail transporter based on the link of the "monorail transporter-gateway system-track-changing branch structure" is summarized as follows: 1.
The avoidance waiting area was set up at each branch of the track-changing branch structure (Figure 9); 2.
The gateway system detects the operation status information of each monorail transporter in real time and calculates a safe avoidance control strategy using the avoidance algorithm based on the operation priority of the monorail transporters when there is a risk of collision between the detected monorail transporters; 3.
Using the results of the avoidance strategy, the gateway system controls the trackchanging branch structure to change the track direction, ensuring that monorail transporters with low operational priority go to the nearest avoidance waiting area and give the right of way of the track to monorail transporters with high operational priority; 4.
During the avoidance process, the gateway system continuously detects the operation status information of each monorail transporter to ensure that all monorail transporters cooperate to avoid conflicts and optimize the avoidance path.If a new risk of collision emerges, the gateway system will devise a new avoidance plan for the monorail transporters to avoid the collision.

Mobile Client Workflow
The mobile client APP was built on the basis of Android Studio and Java language t implement the function; the workflow is shown in Figure 10, and the operation interfac is shown in Figure 11.First, the initialization procedure establishes a connection with th MQTT cloud server.Following a successful link, distinct MQTT uplink and downlin threads are generated for subscribing to and transmitting data.The MQTT uplink threa subscribes to the real-time operation status information of the monorail transporter from the MQTT cloud server, analyzes and processes the information, and updates it to th APP interface, thereby allowing for the monitoring of the operation status information o the monorail transporter.By clicking the button in the interface, the MQTT uplink threa sends the corresponding scheduling command to the MQTT cloud server, thus indirectl sending scheduling commands to the monorail transporter.

Mobile Client Workflow
The mobile client APP was built on the basis of Android Studio and Java language to implement the function; the workflow is shown in Figure 10, and the operation interface is shown in Figure 11.First, the initialization procedure establishes a connection with the MQTT cloud server.Following a successful link, distinct MQTT uplink and downlink threads are generated for subscribing to and transmitting data.The MQTT uplink thread subscribes to the real-time operation status information of the monorail transporter from the MQTT cloud server, analyzes and processes the information, and updates it to the APP interface, thereby allowing for the monitoring of the operation status information of the monorail transporter.By clicking the button in the interface, the MQTT uplink thread sends the corresponding scheduling command to the MQTT cloud server, thus indirectly sending scheduling commands to the monorail transporter.

Experiments on the Precision of Monorail Transporter Operation State Perception Sensing
In this study, a field experiment was performed in April 2023 in a mountainous (lychee) orchard of the Changsheng fruit industry family farm (Yangxi County, Yangjiang City, Guangdong, China) to validate the performance of the location-aware hardware system based on STM32 + RFID + LoRa, as well as to investigate the deployment mode of the HF RFID benchmark positioning tag set and the influencing law of the track road condition on the sensing accuracy of the monorail transporter's operation state.The experimental site covers three typical terrains, including flat, turning, and sloping (uphill/downhill), with an average gradient of the sloping road being 19.22°.In each typical terrain, a test rail with a length of 12 m was set up, the RFID benchmark positioning tag sets numbered 1-25 were deployed at 0.5 m intervals.The site road conditions are shown in Figure 12.To ensure the comprehensiveness of the experiments, two types of monorail transporters, the 7ZDGS-250 and 7ZDGS-300, were used.In addition, the Hall positioning and satellite navigation positioning methods were used in this study to perform side-by-side comparison experiments.In addition, the Hall positioning and the GPS/Beidou positioning methods were used to perform cross-comparison experiments.The Hall positioning method detects the permanent magnet on the motor rotor shaft through the magnetic Hall switch module (NJK-5002-NKK) and achieves the positioning function by realistically counting the number of motor rotation turns, while the GPS/Beidou positioning method

Experiments on the Precision of Monorail Transporter Operation State Perception Sensing
In this study, a field experiment was performed in April 2023 in a mountainous (lychee) orchard of the Changsheng fruit industry family farm (Yangxi County, Yangjiang City, Guangdong, China) to validate the performance of the location-aware hardware system based on STM32 + RFID + LoRa, as well as to investigate the deployment mode of the HF RFID benchmark positioning tag set and the influencing law of the track road condition on the sensing accuracy of the monorail transporter's operation state.The experimental site covers three typical terrains, including flat, turning, and sloping (uphill/downhill), with an average gradient of the sloping road being 19.22 • .In each typical terrain, a test rail with a length of 12 m was set up, the RFID benchmark positioning tag sets numbered 1-25 were deployed at 0.5 m intervals.The site road conditions are shown in Figure 12.
To ensure the comprehensiveness of the experiments, two types of monorail transporters, the 7ZDGS-250 and 7ZDGS-300, were used.In addition, the Hall positioning and satellite navigation positioning methods were used in this study to perform side-by-side comparison experiments.In addition, the Hall positioning and the GPS/Beidou positioning methods were used to perform cross-comparison experiments.The Hall positioning method detects the permanent magnet on the motor rotor shaft through the magnetic Hall switch module (NJK-5002-NKK) and achieves the positioning function by realistically counting the number of motor rotation turns, while the GPS/Beidou positioning method achieves positioning by obtaining the latitude and longitude information of the monorail transporter through the WGS-84 coordinate system through the GPS/Beidou dual-mode positioning module (BH-ATGM332D).The experimental program for the performance of the location-aware hardware system is described as follows: 1.The 7ZDGS-250-type monorail transporter was used, and the flat road condition was selected to start the experiment.Using the No. 1 tag as the starting point, the monorail transporter was started at 2 m from the starting point so that it reached the starting point at a uniform speed.2. When the monorail transporter passes the starting point, the location-aware hardware system calculates the instantaneous traveling speed ( ) of the monorail transporter based on the accurate positioning method of high-frequency RFID technology.3. When the monorail transporter passes the tag No. 2-25 (Tn), the location-aware hardware system calculates the traveling distance (Sn) of the monorail transporter based on the speed obtained in step 2 and the timing of the timer (Tn).4.After completing the above steps, the monorail transporter type was changed, and steps 1 to 3 were repeated to obtain the experimental data of different monorail transporter types.5. Finally, the road condition was changed, and steps 1 to 4 were repeated to study the effect of different road conditions on the experimental results.
Figure 13 shows the experimental results.The road section error gradually increases as the tag distance DT increases, whereas the road section relative error remains stable.The size of the road section relative error of the RFID positioning for the same type of monorail transporter is uphill > downhill > turning > flat road.When going downhill, the road section relative error of 7ZDGS-250-type transport was smaller than that of the 7ZDGS-300-type monorail transporter.In contrast, when going uphill, the road section The experimental program for the performance of the location-aware hardware system is described as follows: 1.
The 7ZDGS-250-type monorail transporter was used, and the flat road condition was selected to start the experiment.Using the No. 1 tag as the starting point, the monorail transporter was started at 2 m from the starting point so that it reached the starting point at a uniform speed.

2.
When the monorail transporter passes the starting point, the location-aware hardware system calculates the instantaneous traveling speed (V n ) of the monorail transporter based on the accurate positioning method of high-frequency RFID technology.

3.
When the monorail transporter passes the tag No. 2-25 (T n ), the location-aware hardware system calculates the traveling distance (S n ) of the monorail transporter based on the speed obtained in step 2 and the timing of the timer (T n ). 4.
After completing the above steps, the monorail transporter type was changed, and steps 1 to 3 were repeated to obtain the experimental data of different monorail transporter types.5.
Finally, the road condition was changed, and steps 1 to 4 were repeated to study the effect of different road conditions on the experimental results.
Figure 13 shows the experimental results.The road section error gradually increases as the tag distance D T increases, whereas the road section relative error remains stable.The size of the road section relative error of the RFID positioning for the same type of monorail transporter is uphill > downhill > turning > flat road.When going downhill, the road section relative error of 7ZDGS-250-type transport was smaller than that of the 7ZDGS-300-type monorail transporter.In contrast, when going uphill, the road section relative error of the 7ZDGS-250-type monorail transporter was larger than that of the 7ZDGS-300-type monorail transporter, mainly because the power of the 7ZDGS-250-type monorail transporter is low under the uphill condition, causing the cumulative error and the road section relative error of the 7ZDGS-250 type monorail transporter to increase.
Agriculture 2023, 13, x FOR PEER REVIEW 16 of 23 relative error of the 7ZDGS-250-type monorail transporter was larger than that of the 7ZDGS-300-type monorail transporter, mainly because the power of the 7ZDGS-250-type monorail transporter is low under the uphill condition, causing the cumulative error and the road section relative error of the 7ZDGS-250 type monorail transporter to increase.Based on the experimental results, the following tag distance selection strategies are recommended to ensure the efficiency of farm work: 1. Flat road and turning road: The tag distance can be set at 10 m to control the road section error within 20 cm and the road section relative error within 2%.Under this tag distance, the road section average relative error of the 7ZDGS-300-type monorail transporter is 1.35%, and the road section average relative error of the 7ZDGS-250type monorail transporter is 1.27%.2. Sloping road: Because the length of the monorail transporter used in this study is 3.42 m, it is recommended that the tag distance should be greater than 3.42 m.In addition, the uphill condition of the road section relative error was greater than that of the downhill condition of the road section relative error to ensure the safety of multimachine cooperation.Therefore, it is recommended that the difference between the tag distance and length of the monorail transporter should be twice greater than the uphill section of the road section relative error and that the tag distance be set at 6 m.

Verification Experiments of the Location-Aware Hardware System
The accurate positioning method based on the HF RFID technology characterizes the average driving speed of the monorail transporter under road conditions by the instantaneous driving speed at the starting point to obtain the monorail transporter's real-time on-track position.Validation experiments were performed to verify the applicability of the location-aware hardware system based on this method and to determine whether  Based on the experimental results, the following tag distance selection strategies are recommended to ensure the efficiency of farm work: 1.
Flat road and turning road: The tag distance can be set at 10 m to control the road section error within 20 cm and the road section relative error within 2%.Under this tag distance, the road section average relative error of the 7ZDGS-300-type monorail transporter is 1.35%, and the road section average relative error of the 7ZDGS-250type monorail transporter is 1.27%.

2.
Sloping road: Because the length of the monorail transporter used in this study is 3.42 m, it is recommended that the tag distance should be greater than 3.42 m.In addition, the uphill condition of the road section relative error was greater than that of the downhill condition of the road section relative error to ensure the safety of multimachine cooperation.Therefore, it is recommended that the difference between the tag distance and length of the monorail transporter should be twice greater than the uphill section of the road section relative error and that the tag distance be set at 6 m.

Verification Experiments of the Location-Aware Hardware System
The accurate positioning method based on the HF RFID technology characterizes the average driving speed of the monorail transporter under road conditions by the instantaneous driving speed at the starting point to obtain the monorail transporter's real-time on-track position.Validation experiments were performed to verify the applicability of the location-aware hardware system based on this method and to determine whether different starting points under the same road condition affect the positioning accuracy of the location-aware hardware system.The 7ZDGS-300-type monorail transporter was used to start at 2 m from the starting point and traveled 10 m on a flat road with tags No. 1, 2, 3, 4, and 5 as the starting points.The experimental data are shown in Table 1.The experimental results show that when the location-aware hardware system is turned on at different starting points of the same road section, the difference between the road section relative error for the starting points of tags No. 2, No. 3, No. 4, and No. 5 and the road section relative error for the starting point of tag No. 1 ranges from 0.21% on average only.Therefore, the location-aware hardware system has minimal influence on its positioning accuracy when it is turned on at different starting points of the same road section, and it also shows that the location-aware hardware system has good universality and robustness.

Cross-Comparison Experiments-The Hall Positioning Method
The experimental program for the comparison of the Hall positioning method is described as follows: 1.
The 7ZDGS-250-type monorail transporter was used, and the flat road condition was selected to start the experiment.Using tag No. 1 as the starting point, the monorail transporter was positioned at 2 m from the starting point so that it reached the starting point at a uniform speed.

2.
When the monorail transporter passes the starting point, the location-aware hardware system activates the Hall positioning method and counts the motor shaft of the monorail transporter in real time; 3.
When the monorail transporter passes tag Nos.2-25 (T n ), the number of motor rotations was obtained at the corresponding tag (n) and the traveling distance of the monorail transporter (H n ) using Equation ( 4), where r is the gear radius with a value of 0.135 m, and a is the gear ratio of 10.4166:1.4.
After completing the above steps, the monorail transporter type was changed, and steps 1 to 3 were repeated to obtain experimental data for different monorail transporter types.

5.
Finally, the road conditions were changed, and steps 1 to 4 were repeated to study the effect of different road conditions on the experimental results.
The experimental results show that the RFID positioning method has a lower road section relative error than the road section relative error of the Hall positioning method for the 7ZDGS-250-and 7ZDGS-300-type monorail transporters on flat and turning roads (Figure 14).The relative errors were approximately 4.90% and 8.59%, and 6.08% and 51.72%, respectively, when the tag distance was set at 10 m.Furthermore, when the tag distance was set to 6 m, the road section relative error of the RFID positioning method was lower than that of the Hall positioning method for both the 7ZDGS-250-and 7ZDGS-300-type monorail transporters, by approximately 45.25% and 27.48%, and 23.43% and 16.13%, respectively, for both downhill and uphill road conditions.The results of the cross-comparison experiments show that the RFID positioning method exhibits superior positioning accuracy under different road conditions, and the road section relative error of the Hall positioning method was relatively increased.This phenomenon may be because the magnetic Hall switch module works on the principle of magnetic pole induction, and the permanent magnet affects the counting accuracy of the magnetic Hall switch module under high-speed rotation and oscillation, leading to a larger road section relative error.

Cross-Comparison Experiments-The GPS/Beidou Positioning Method
The experimental program for comparing the GPS/Beidou positioning methods is described as follows: 1.The 7ZDGS-300-type monorail transporter was used, and the flat road condition was selected to start the experiment.Using tag No. 1 as the starting point, the monorail transporter was positioned at 2 m from the starting point so that it reached the starting point at uniform speed.2. When the monorail transporter passes the starting point, the location-aware hardware system starts the GPS/BeiDou positioning method to obtain the latitude and longitude coordinates (x1, y1) of the starting point 3.When the monorail transporter passes tag No. 2-25 (Tn), the location-aware hardware system acquires the latitude and longitude coordinates (xm, ym) at the corresponding tag and obtains the traveling distance (Gn) of the monorail transporter using Equation ( 5), where R is the radius of the earth, which is approximately 6,371,004 m.The results of the cross-comparison experiments show that the RFID positioning method exhibits superior positioning accuracy under different road conditions, and the road section relative error of the Hall positioning method was relatively increased.This phenomenon may be because the magnetic Hall switch module works on the principle of magnetic pole induction, and the permanent magnet affects the counting accuracy of the magnetic Hall switch module under high-speed rotation and oscillation, leading to a larger road section relative error.

Cross-Comparison Experiments-The GPS/Beidou Positioning Method
The experimental program for comparing the GPS/Beidou positioning methods is described as follows: 1.
The 7ZDGS-300-type monorail transporter was used, and the flat road condition was selected to start the experiment.Using tag No. 1 as the starting point, the monorail transporter was positioned at 2 m from the starting point so that it reached the starting point at uniform speed.

2.
When the monorail transporter passes the starting point, the location-aware hardware system starts the GPS/BeiDou positioning method to obtain the latitude and longitude coordinates (x 1 , y 1 ) of the starting point 3.
When the monorail transporter passes tag No. 2-25 (T n ), the location-aware hardware system acquires the latitude and longitude coordinates (x m , y m ) at the correspond-ing tag and obtains the traveling distance (G n ) of the monorail transporter using Equation ( 5), G n = Rarccos(cos y 1 cos y 2 cos(x 2 − x 1 ) + sin y 1 sin y 2 ), (5) where R is the radius of the earth, which is approximately 6,371,004 m. 4.
The road conditions were changed, and steps 1 to 3 were repeated to study the effect of different road conditions on the experimental results.
When the tag distance was set at 10 m, the GPS/BeiDou positioning effect of the 7ZDGS-300 monorail transporter at the slope was significantly poor, with a road section error of 12.77 m and a road section relative error of 127.69%.The cause of this phenomenon may be because the slope was located on the hillside, and the canopy of the fruit trees above it was heavily covered, resulting in a weak acceptance strength of the GPS/BeiDou satellite signals, which significantly affects the positioning accuracy.Based on the data of the flat road and turning road for cross-comparison with RFID positioning, the experimental results are shown in Figure 15.When the tag distance was set at 10 m, the road section relative error of the RFID positioning method was better than the road section relative error of the GPS/Beidou positioning method, by approximately 11.94% and 14.215%, respectively.Based on these experimental results, it is recommended that the GPS/BeiDou positioning methods be used with caution in the positioning task at ramps, particularly in the case of severe fruit tree canopy cover, where the GPS/BeiDou positioning effect may be significant.In contrast, RFID positioning methods showed better positioning accuracy in all road conditions.Agriculture 2023, 13, x FOR PEER REVIEW 19 of 23 4. The road conditions were changed, and steps 1 to 3 were repeated to study the effect of different road conditions on the experimental results.
When the tag distance was set at 10 m, the GPS/BeiDou positioning effect of the 7ZDGS-300 monorail transporter at the slope was significantly poor, with a road section error of 12.77 m and a road section relative error of 127.69%.The cause of this phenomenon may be because the slope was located on the hillside, and the canopy of the fruit trees above it was heavily covered, resulting in a weak acceptance strength of the GPS/BeiDou satellite signals, which significantly affects the positioning accuracy.Based on the data of the flat road and turning road for cross-comparison with RFID positioning, the experimental results are shown in Figure 15.When the tag distance was set at 10 m, the road section relative error of the RFID positioning method was better than the road section relative error of the GPS/Beidou positioning method, by approximately 11.94% and 14.215%, respectively.Based on these experimental results, it is recommended that the GPS/BeiDou positioning methods be used with caution in the positioning task at ramps, particularly in the case of severe fruit tree canopy cover, where the GPS/BeiDou positioning effect may be significant.In contrast, RFID positioning methods showed better positioning accuracy in all road conditions.

Communication and Control Experiments for the Multimode Control Gateway System for the Monorail Transporter
In this study, a self-assembling gateway system network was built to verify the communication function of the gateway system and the avoidance strategy of the monorail transporter.The terminals have a 7ZDGS-300-type monorail transporter (Transporter A), a 7ZDGS-250-type monorail transporter (Transporter B), and a track-changing branch structure, with the initial state of the track-changing branch structure on the left.Transporter A's operation priority was higher than Transporter B's.The benchmark positioning tags were deployed at a distance of 10 m for multitransporter communication and control experiments based on two typical avoidance scenarios.
The first avoidance scenario is that Transporter A and B were at tag No. 2 and 3 of the main branch of the track-changing branch structure, respectively, and the destination of Transporter A was tag No. 9 of the left branch of the track-changing branch structure.A schematic of the avoidance results and field experiments is shown in Figure 16

Communication and Control Experiments for the Multimode Control Gateway System for the Monorail Transporter
In this study, a self-assembling gateway system network was built to verify the communication function of the gateway system and the avoidance strategy of the monorail transporter.The terminals have a 7ZDGS-300-type monorail transporter (Transporter A), a 7ZDGS-250-type monorail transporter (Transporter B), and a track-changing branch structure, with the initial state of the track-changing branch structure on the left.Transporter A's operation priority was higher than Transporter B's.The benchmark positioning tags were deployed at a distance of 10 m for multitransporter communication and control experiments based on two typical avoidance scenarios.
The first avoidance scenario is that Transporter A and B were at tag No. 2 and 3 of the main branch of the track-changing branch structure, respectively, and the destination of Transporter A was tag No. 9 of the left branch of the track-changing branch structure.A schematic of the avoidance results and field experiments is shown in Figure 16.The gateway system controls the track-changing branch structure to switch the track to the right, then controls Transporter B to travel to avoidance waiting areas at tag No. 10 of the right branch, controls the track-changing branch structure to switch the track to the left, and finally controls Transporter A to travel to tag No. 9 of the left branch.

Conclusions
The location-aware hardware system based on STM32 + RFID + LoRa desi this study shows good feasibility and stability in monorail transport.This strateg acterizes the average driving speed of a monorail transporter under road condit the instantaneous driving speed at the starting point.It accurately the monora porter's on-track position in real time.Based on the performance of the location hardware system, a tag distance selection strategy was proposed; the distance benchmark positioning tags was set at 10 m under flat and turning road condition rently, the average relative error of road sections of the 7ZDGS-300-type monora porter is 1.35%, while the average section relative error of the 7ZDGS-250-type m transporter is 1.27%.The 6 m distance of the reference positioning tags in the uphil hill benchmark effectively ensures that the monorail transporter avoids collisio strategy provides practical guidance to improve the efficiency of orchard transp optimizes the location-aware hardware system to enhance its positioning accura reliability.

Conclusions
The location-aware hardware system based on STM32 + RFID + LoRa designed in this study shows good feasibility and stability in monorail transport.This strategy characterizes the average driving speed of a monorail transporter under road conditions by the instantaneous driving speed at the starting point.It accurately the monorail transporter's on-track position in real time.Based on the performance of the location-aware hardware system, a tag distance selection strategy was proposed; the distance of the benchmark positioning tags was set at 10 m under flat and turning road conditions.Currently, the average relative error of road sections of the 7ZDGS-300-type monorail transporter is 1.35%, while the average section relative error of the 7ZDGS-250-type monorail transporter is 1.27%.The 6 m distance of the reference positioning tags in the uphill/downhill benchmark effectively ensures that the monorail transporter avoids collision.This strategy provides practical guidance to improve the efficiency of orchard transport and optimizes the location-aware hardware system to enhance its positioning accuracy and reliability.
The effect of different starting points on the positioning accuracy of the location-aware hardware system was also verified in this study, and the results showed that the effect was small and negligible on the positioning accuracy of the location-aware hardware system.In addition, the superiority of the RFID positioning method under different road conditions was verified using a cross-comparison experiment with other positioning methods.In addition, the RFID positioning method shows better positioning accuracy and robustness than the Hall and GPS/Beidou positioning methods.
In this study, an avoidance strategy for monorail transporters combined with a trackchanging branch structure was proposed, which significantly allows for the simultaneous operation of multiple monorail transporters to achieve the efficient and safe completion of operations on the track.This not only improves the flexibility and reliability of the monorail transporters but also provides technical support for cooperative work and the intelligent management of the monorail transporter fleet in real agricultural scenarios.
Some tasks in this study require further improvement, such as the poor positioning accuracy of the location-aware hardware system in uphill/downhill conditions and the avoidance strategy.In future research, the performance and parameters of the locationaware hardware system will be evaluated and compared in detail to provide reliable data support for further optimizing and improving the accuracy of the location-aware hardware system.In addition, the avoidance strategy can be optimized by integrating deep learning technology to improve the system's adaptive ability in complex situations.This would help the system better cope with the challenges commonly encountered in practical applications.
At the same time, the coverage of the multimodal control gateway system is affected by the actual orchard environment.When deploying the system, it is possible to increase the coverage area of the gateway system by adding relay nodes or using dual LoRa communication modules on the gateway system to handle different tasks, reduce data conflicts, and enhance the scalability of the multimodal control gateway system.In addition, in the future, various agricultural machinery can be carried on the monorail transport for collaborative operation, such as spray, which can achieve self-spray at a fixed time, improve the efficiency and effect of spray, make the monorail transport more relevant in other aspects, and promote the development of intelligent agriculture.

Figure 4 .
Figure 4. Circuit board of the location-aware hardware system.

Figure 6 .
Figure 6.Multimode control gateway system design and object.

Figure 7 .
Figure 7. Workflow diagram of multimodal control gateway system for multitasking programming using Python based on Linux system.

Figure 7 .
Figure 7. Workflow diagram of multimodal control gateway system for multitasking programming using Python based on Linux system.

Figure 9 .
Figure 9. Schematic diagram of avoidance waiting areas set up at each branch of the track-changin branch structure.

Figure 9 .
Figure 9. Schematic diagram of avoidance waiting areas set up at each branch of the track-changing branch structure.

Agriculture 2023 , 23 Figure 10 .Figure 10 .
Figure 10.Workflow diagram of a mobile client app based on Android Studio.

Figure 11 .
Figure 11.Mobile client interface.Numbers 1 to 12: the benchmark positioning tag number.

Figure 11 .
Figure 11.Mobile client interface.Numbers 1 to 12: the benchmark positioning tag number.

Agriculture 2023 ,
13,  x FOR PEER REVIEW 15 of 23 achieves positioning by obtaining the latitude and longitude information of the monorail transporter through the WGS-84 coordinate system through the GPS/Beidou dual-mode positioning module (BH-ATGM332D).

Figure 12 .
Figure 12.The site road conditions.4.1.1.Experiments on the Performance of Location-Aware Hardware System

Figure 12 .
Figure 12.The site road conditions.4.1.1.Experiments on the Performance of Location-Aware Hardware System

Figure 13 .
Figure 13.Curves for experiments on the performance of location-aware hardware systems.

Figure 13 .
Figure 13.Curves for experiments on the performance of location-aware hardware systems.

Figure 14 .
Figure 14.Curves for cross-comparison experiments using the Hall positioning method.

Figure 14 .
Figure 14.Curves for cross-comparison experiments using the Hall positioning method.

Figure 15 .
Figure 15.Curves for cross-comparison experiments using the GPS/Beidou positioning method.

Figure 15 .
Figure 15.Curves for cross-comparison experiments using the GPS/Beidou positioning method.

Agriculture 2023 ,
13, x FOR PEER REVIEW 20 of 23 right branch, controls the track-changing branch structure to switch the track to the left, and finally controls Transporter A to travel to tag No. 9 of the left branch.

Figure 16 .
Figure 16.Schematic of the field experiment for the first avoidance results.

Figure 16 .
Figure 16.Schematic of the field experiment for the first avoidance results.The second avoidance scenario involves Transporters A and B being at tag Nos. 2 and 3 of the main track-changing branch structure, respectively, and the destination of Transporter A being tag No. 12 of the right branch of the track-changing branch structure.A schematic of the avoidance results and the field experiment are shown in Figure 17, where the gateway system controls Transporter B to travel to tag No. 7 of the left branch

Figure 17 .
Figure 17.Schematic and field experiment for the second avoidance results.

Figure 17 .
Figure 17.Schematic and field experiment for the second avoidance results.

Table 1 .
Experimental data for the verification of the location-aware hardware system.