Design and Experiment of the Automatic Laying System for Rice Seedling Tray

: In the process of raising rice seedlings, it is necessary to manually place the seedling trays one by one in the seedling ﬁeld, which is labor intensive and low in efﬁciency. In order to solve this problem, according to the actual conditions of the rice seedling ﬁeld, this paper designs and develops an automatic rice tray laying system, which consists of a gantry truss moving unit, a tray laying trolley unit, a tray laying mechanism unit and a sensor control unit. Through the movement and timing coordination of the cams in the laying mechanism unit, four actions of holding, clamping, laying and restoring are designed to realize the orderly and automatic laying of the stacked seedling trays one by one. In order to meet the agronomic requirements of the horizontal and vertical spacing of seeding trays, especially the efﬁciency of rice tray laying, the control strategies of the key parts of the system were simulated, selected and optimized. For the longitudinal movement of the gantry truss, the cross-coupling control strategy is adopted to realize the detection and compensation correction of the synchronous position error of the two driving motors. As for the drive motor of the laying trolley and the laying mechanism, the optimized master-slave follow-up control method is adopted to improve the efﬁciency and accuracy. The results of simulation and ﬁeld experiment show that when the tray trolley moves on the gantry truss at the speed of 7.5 cm/s, the gantry truss moves at the speed of 35 cm/s in the longitudinal direction, and when the height of the tray laying mechanism is 100 mm from the ground and the motor speed is 375 rpm, the horizontal spacing of the tray can be maintained at 25 ± 5 mm and the vertical spacing at 15 ± 5 mm. The efﬁciency of tray laying can be increased by 35.7%, up to 380 trays/h, meeting the technical requirements of mechanized ﬁeld tray laying. Contributions: Conceptualization, J.C.; methodology, X.X., J.W. Y.Z.; investi-gation, Q.Z. X.X.; data curation, J.W. Y.Z.; formal analysis, Q.Z. and J.C.; writing—original draft, Q.Z.; writing—review and editing, Q.Z., J.W., Y.Z. and J.C.; project administration, Q.Z.; X.X.


Introduction
Rice is the main food crop in China, but the mechanization level of rice planting is relatively low. Rice seedling raising is a key link in rice planting. At present, there are factory assembly lines for planting and raising seedlings. However, the transporting of the sowed seedling trays to the seedling field, and laying them neatly and orderly in the seedling field is done manually [1]. Manual laying will inevitably lead to high labor cost and low efficiency. Therefore, in order to improve the production efficiency and reduce the cost of seedling raising, it is necessary to develop a rice seedling tray laying system with a high degree of automation and good quality.
In the United States, Australia, the Netherlands and other European countries, direct seeding is generally used for rice planting, so there is little research on the special agricultural equipment for rice seedling tray laying [2]. However, for the seedlings of economic crops such as vegetables and flowers, a seeding assembly line with complete functions and a high degree of automation was adopted. In the Netherlands, two companies called Visser tray in the Chinese market. In addition, the laying machines generally require a better external use environment and better hardware supporting facilities, which are not available for small and medium-sized farmers in China, so they have not been widely recognized.
At present, the existing rice seedling tray laying device in China mainly realizes the laying action through the cooperation of a conveyor belt, an electric push rod, a manipulator, and a suction cup. Among them, there are some relatively novel laying equipment, but the overall degree of automation is not high, much manual participation is required, there are common problems such as low efficiency and inconvenient operation, and they are all in the stage of research and development or laboratory test, and they have not been popularized in the field. Therefore, we designed and developed an automatic rice tray laying system, which uses the preset longitudinal track in the seedling field; the gantry truss moves along the longitudinal track, and the tray laying trolley moves horizontally on the gantry truss to realize the automatic tray laying operation [12]. It is suitable for small and mediumsized farmers in China. It has the characteristics of simple structure, moderate cost, good versatility, simple operation, and a high degree of automation. Farmers only need to load seedling trays on one side to complete the laying of all seedling trays. Table 1 shows the comparison with the existing laying machine model.

Materials
The overall structure of the rice seedling tray automatic laying system is shown in Figure 1, which mainly includes preset track 1, gantry truss 2, plate laying trolley 3, and control cabinet 4. The gantry truss has a span of 8 m and adopts an assembled structure, as shown in Figure 2, which is mainly composed of drive wheel components and a truss. The driving wheel components are distributed at the two ends of the bottom of the truss. Both sides  The gantry truss has a span of 8 m and adopts an assembled structure, as shown in Figure 2, which is mainly composed of drive wheel components and a truss. The driving wheel components are distributed at the two ends of the bottom of the truss. Both sides are powered by a servo motor matching reducer. The front and rear moving wheels on the same side are driven synchronously through a chain drive. The truss is composed of standard steel round tubes, square tubes and a groove bottom frame, which can be divided into triangular trusses and square trusses. The triangular trusses are connected laterally by bolts, the square trusses are fixed at both ends, and the trough bottom plate is used as the truss support for flexible disassembly and assembly.

Gantry Truss
The gantry truss has a span of 8 m and adopts an assembled structure, as shown in Figure 2, which is mainly composed of drive wheel components and a truss. The driving wheel components are distributed at the two ends of the bottom of the truss. Both sides are powered by a servo motor matching reducer. The front and rear moving wheels on the same side are driven synchronously through a chain drive. The truss is composed of standard steel round tubes, square tubes and a groove bottom frame, which can be divided into triangular trusses and square trusses. The triangular trusses are connected laterally by bolts, the square trusses are fixed at both ends, and the trough bottom plate is used as the truss support for flexible disassembly and assembly. The gantry truss is used as the moving track of the paving trolley, and the overall rigidity is an important evaluation index of the structure. In order to further study the rigidity of the truss, the finite element technology is used to carry out static analysis with the help of ANSYS workbench software. In order to improve the calculation efficiency, the analysis model is simplified in Solidworks software, and the material properties of the model are assigned. The truss adopts carbon steel Q235, and the material properties are shown in Table 2.  The gantry truss is used as the moving track of the paving trolley, and the overall rigidity is an important evaluation index of the structure. In order to further study the rigidity of the truss, the finite element technology is used to carry out static analysis with the help of ANSYS workbench software. In order to improve the calculation efficiency, the analysis model is simplified in Solidworks software, and the material properties of the model are assigned. The truss adopts carbon steel Q235, and the material properties are shown in Table 2. According to the actual working conditions, the entire gantry truss is supported at both ends, which can be approximated as a simply supported beam subjected to concentrated forces. As shown in Figure 3, when the trolley is in the middle of the gantry truss, the gantry truss has the maximum bending deformation at this time.
Agriculture 2021, 11, x FOR PEER REVIEW 5 of 23 According to the actual working conditions, the entire gantry truss is supported at both ends, which can be approximated as a simply supported beam subjected to concentrated forces. As shown in Figure 3, when the trolley is in the middle of the gantry truss, the gantry truss has the maximum bending deformation at this time. In the process of modelling constraints, the four wheel components of the truss are fixed. When loading the truss, the weight of the truss itself, the pressure of the tray laying trolley and the weight of the tray loaded by the trolley should be considered. The loading details are shown in Table 3.  In the process of modelling constraints, the four wheel components of the truss are fixed. When loading the truss, the weight of the truss itself, the pressure of the tray laying trolley and the weight of the tray loaded by the trolley should be considered. The loading details are shown in Table 3. Finally, the final force and deformation of the gantry truss are calculated, and the result is shown in Figure 4.  In the process of modelling constraints, the four wheel components of the truss are fixed. When loading the truss, the weight of the truss itself, the pressure of the tray laying trolley and the weight of the tray loaded by the trolley should be considered. The loading details are shown in Table 3. Finally, the final force and deformation of the gantry truss are calculated, and the result is shown in Figure 4.   It can be seen from Figure 4 that the maximum deflection of the truss appears in the middle, and the deformation is 11.073 mm. During the laying operation, the distance between the laying mechanism and the ground is 100 mm, so the deformation caused by the truss will not affect the laying operation and the laying quality. The maximum stress of the truss is 131.68 MPa at the joint of the truss and the moving wheel, which is within the bearing range of the structure. The design is reasonable and meets the requirements.

Tray Laying Trolley
The tray laying trolley is the core working component of the system; it needs to be loaded with seedling trays and moved on the gantry truss. Before tray laying, the seedling trays must be lowered to a suitable height from the field before tray laying. Therefore, the structure of the tray laying trolley mainly includes a trolley body frame, a traveling drive assembly, and a seedling tray lifting mechanism, as shown in Figure 5.
truss will not affect the laying operation and the laying quality. The maximum stress of the truss is 131.68 MPa at the joint of the truss and the moving wheel, which is within the bearing range of the structure. The design is reasonable and meets the requirements.

Tray Laying Trolley
The tray laying trolley is the core working component of the system; it needs to be loaded with seedling trays and moved on the gantry truss. Before tray laying, the seedling trays must be lowered to a suitable height from the field before tray laying. Therefore, the structure of the tray laying trolley mainly includes a trolley body frame, a traveling drive assembly, and a seedling tray lifting mechanism, as shown in Figure 5. As the main structure of the tray laying trolley, the frame of the trolley body should not only facilitate the installation of accessories, but also must be simple to process, strong and reliable. It is welded into a whole by rectangular square tubes of uniform specifications, and the bottom of the trolley body frame is connected on all sides to form a closed structure, which greatly improves the overall rigidity. The upper part of the trolley body frame is connected on three sides, and one side of the opening is used to manually put the seedling tray into the trolley.
There are front and rear drive shafts in the middle of the trolley body frame, and a unilateral limit moving wheel is fixed at both ends of the same shaft. The laying trolley has only one drive motor, and the drive torque is directly transmitted to one of the drive shafts through a set of gears, forming a single-sided direct drive mode, as show in Figure  6. Through the forward and reverse rotation of the driving motor, the laying trolley can realize linear reciprocating motion on the truss, with high driving efficiency and precise control. As the main structure of the tray laying trolley, the frame of the trolley body should not only facilitate the installation of accessories, but also must be simple to process, strong and reliable. It is welded into a whole by rectangular square tubes of uniform specifications, and the bottom of the trolley body frame is connected on all sides to form a closed structure, which greatly improves the overall rigidity. The upper part of the trolley body frame is connected on three sides, and one side of the opening is used to manually put the seedling tray into the trolley.
There are front and rear drive shafts in the middle of the trolley body frame, and a unilateral limit moving wheel is fixed at both ends of the same shaft. The laying trolley has only one drive motor, and the drive torque is directly transmitted to one of the drive shafts through a set of gears, forming a single-sided direct drive mode, as show in Figure 6. Through the forward and reverse rotation of the driving motor, the laying trolley can realize linear reciprocating motion on the truss, with high driving efficiency and precise control.  The lifting mechanism of the seedling tray box mainly includes a lifting drive motor, a screw nut and a guide rail slider. The screw nut and the lifting block on one side of the seedling tray box are fixed together. As the screw rod rotates on the fixed axis, the screw pair between the screw rod and the nut makes the seedling tray box move up and down. On the same side of the screw rod, guide rail sliders are installed on the left and right of the seedling tray box, in which the slide is fixed on the side wall of the seedling tray box, and the linear guide rail is fixed on the trolley frame, as shown in Figure 7. Each time the seedling trays are manually loaded into the seedling tray box at a different position, it will affect the center of gravity of the seedling tray box. Therefore, the seedling tray box may tilt during the lifting process. Two sets of support wheels are installed on the opposite side of the guide rail slider to ensure the vertical lifting of the seedling tray box. The lifting mechanism of the seedling tray box mainly includes a lifting drive motor, a screw nut and a guide rail slider. The screw nut and the lifting block on one side of the seedling tray box are fixed together. As the screw rod rotates on the fixed axis, the screw pair between the screw rod and the nut makes the seedling tray box move up and down. On the same side of the screw rod, guide rail sliders are installed on the left and right of the seedling tray box, in which the slide is fixed on the side wall of the seedling tray box, and the linear guide rail is fixed on the trolley frame, as shown in Figure 7. Each time the seedling trays are manually loaded into the seedling tray box at a different position, it will affect the center of gravity of the seedling tray box. Therefore, the seedling tray box may a screw nut and a guide rail slider. The screw nut and the lifting block on one side of the seedling tray box are fixed together. As the screw rod rotates on the fixed axis, the screw pair between the screw rod and the nut makes the seedling tray box move up and down. On the same side of the screw rod, guide rail sliders are installed on the left and right of the seedling tray box, in which the slide is fixed on the side wall of the seedling tray box, and the linear guide rail is fixed on the trolley frame, as shown in Figure 7. Each time the seedling trays are manually loaded into the seedling tray box at a different position, it will affect the center of gravity of the seedling tray box. Therefore, the seedling tray box may tilt during the lifting process. Two sets of support wheels are installed on the opposite side of the guide rail slider to ensure the vertical lifting of the seedling tray box.

Tray Laying Mechanism
The tray laying mechanism is composed of two sets of cam groups with different profile curves, which are installed symmetrically and coaxially. Through the phase difference of the two cams installed on the shaft, the coordination of the claw and the supporting plate in the time sequence is realized, so as to complete the orderly and one by one laying of the stacked seedling tray. The power is provided by a servo motor matching with the reducer and through the chain drive. When operating, the left and right laying mechanisms rotate at the same time, and each rotation cycle completes a laying action, as shown in Figure 8.

Tray Laying Mechanism
The tray laying mechanism is composed of two sets of cam groups with different profile curves, which are installed symmetrically and coaxially. Through the phase difference of the two cams installed on the shaft, the coordination of the claw and the supporting plate in the time sequence is realized, so as to complete the orderly and one by one laying of the stacked seedling tray. The power is provided by a servo motor matching with the reducer and through the chain drive. When operating, the left and right laying mechanisms rotate at the same time, and each rotation cycle completes a laying action, as shown in Figure 8. The laying process of the tray laying mechanism can be divided into four actions, which are holding, clamping, laying and restoring. The specific actions are broken down as shown in Figure 9. The laying process of the tray laying mechanism can be divided into four actions, which are holding, clamping, laying and restoring. The specific actions are broken down as shown in Figure 9. The laying process of the tray laying mechanism can be divided into four actions, which are holding, clamping, laying and restoring. The specific actions are broken down as shown in Figure 9.  Figure 9a shows the initial state of the laying mechanism. Cam I is near the resting point, which makes the claw retract in the sheet metal housing, but cam II is at the far rest point, which makes the swing rod at the maximum swing angle, and the supporting plate constrains the bottom of the last seedling tray to realize the action of holding the seedling tray. With the clockwise rotation of shaft I, when cam I is in the push motion, the claw gradually extends out and is stuck between the penultimate first and the second tray. At the same time, cam II is still in the far rest state and continues to support the bottom of the lowest seedling tray. As shown in Figure 9b, the chuck action is just completed. When cams I and II are in the position as shown in Figure 9c, cam I presses the claws to make them completely stuck on the edge of the penultimate seedling tray to prevent other seedling trays from falling. At the same time, cam II gradually returns and reaches the resting point, and the supporting plate gradually releases to make it fall completely. At this moment, the laying action is completed. As shaft I continues to rotate, as shown in Figure 9d,  Figure 9a shows the initial state of the laying mechanism. Cam I is near the resting point, which makes the claw retract in the sheet metal housing, but cam II is at the far rest point, which makes the swing rod at the maximum swing angle, and the supporting plate constrains the bottom of the last seedling tray to realize the action of holding the seedling tray. With the clockwise rotation of shaft I, when cam I is in the push motion, the claw gradually extends out and is stuck between the penultimate first and the second tray. At the same time, cam II is still in the far rest state and continues to support the bottom of the lowest seedling tray. As shown in Figure 9b, the chuck action is just completed. When cams I and II are in the position as shown in Figure 9c, cam I presses the claws to make them completely stuck on the edge of the penultimate seedling tray to prevent other seedling trays from falling. At the same time, cam II gradually returns and reaches the resting point, and the supporting plate gradually releases to make it fall completely. At this moment, the laying action is completed. As shaft I continues to rotate, as shown in Figure 9d, cam I begins to return to make the claw retract, corresponding to cam II also entering the push stage, the swing rod begins to swing back, and the supporting plate will support the bottom of the last seedling tray again. From Figure 9a-d, the rotating shaft I rotates clockwise for one circle, and the tray laying mechanism completes four actions in turn to realize the laying of a seedling tray.
Through the decomposition of the laying action, we can see that each action corresponds to a limit position of the cam. According to the practical requirements of the laying mechanism, such as low rotation speed, heavy load and stable dropping of the tray. The claw and supporting plate are used as the follower of cam I and cam II, and their changing process can adopt the cosine acceleration motion law with flexible impact, which is suitable for the general situation of medium low speed and heavy load. Based on the above analysis, the motion sequence diagram of the claw and the supporting plate can be obtained, and the contour curve of the corresponding cam can be obtained by the drawing method, as shown in Figure 10.

Workflow of Tray Laying System
The field work diagram of rice tray automatic laying system is shown in Figure 11, in which the longitudinal track is preset on both sides of the greenhouse seedling field, and the transverse gantry truss carries the laying trolley. The laying trolley moves horizontally on the gantry, and the tray laying is realized by the built-in tray laying mechanism. When a row of horizontal trays is laid, the gantry truss and the tray trolley move along the longitudinal track to realize the longitudinal tray laying. The specific work flow is shown in Figure 12. The laying trolley moves horizontally on the gantry, and the tray laying is realized by the built-in tray laying mechanism. When a row of horizontal trays is laid, the gantry truss and the tray trolley move along the longitudinal track to realize the longitudinal tray laying. The specific work flow is shown in Figure 12. The laying trolley moves horizontally on the gantry, and the tray laying is re by the built-in tray laying mechanism. When a row of horizontal trays is laid, the g truss and the tray trolley move along the longitudinal track to realize the longitudin laying. The specific work flow is shown in Figure 12.

Design of the Control System of Tray Laying System
In view of the function and space layout requirements of the tray laying system, according to the idea of modularization, the tray laying system is divided into a truss longitudinal fixed-length moving module, a tray laying trolley horizontal moving module, a seedling tray box lifting module, and a tray laying mechanism drive module. Five threephase permanent magnet servo motors (PMSM) are used in the entire system, of which two high-power A2 series AC servo motors from Delta are used for the longitudinal movement of the truss, and three low-power B2 series AC servo motors are used for other modules. In order to maintain high response and consistency, the truss longitudinal moving motor adopts position control by communicating with the system controller, and the other three servo motors adopt high-speed pulse and direction control mode.
According to the previous analysis of motor control, the Siemens S1200 series PLC (Programmable Logic Controller) is selected as the control core of the system, which can meet the control requirements of five motors. It uses external signal elements such as proximity switches and photoelectric switches to detect key working positions, and uses HMI control with a touch screen. The specific control system components and control electrical cabinets are shown in Figure 13a,b.
According to the previous analysis of motor control, the Siemens S1200 series PL (Programmable Logic Controller) is selected as the control core of the system, which ca meet the control requirements of five motors. It uses external signal elements such as pro imity switches and photoelectric switches to detect key working positions, and uses HM control with a touch screen. The specific control system components and control electric cabinets are shown in Figure 13a

Control Strategy of Tray Laying System
The tray laying machine can run well and meet the agronomic requirements of field laying. The key is the coordinated control between the two driving motors of the gantry truss, the two driving motors of the laying trolley and the laying mechanism. There are three main ways to use the PLC as the main controller for multi motor cooperative control, which are parallel closed-loop control, master-slave follow-up control and cross coupling control [13][14][15].
In order to better compare the advantages of various control strategies, choose the most suitable control strategy for each module of the system, establish a three-phase PMSM (Permanent magnet synchronous motor) vector control simulation model in MATLAB/Simulink, and analyze three common motor cooperative control strategies.
In the vector control method of the motor, it is necessary to transform the natural coordinate system of the motor into a synchronous rotation coordinate system of d-q two directions, that is, three-phase static becomes two-phase rotation. Therefore, in the simu-

Control Strategy of Tray Laying System
The tray laying machine can run well and meet the agronomic requirements of field laying. The key is the coordinated control between the two driving motors of the gantry truss, the two driving motors of the laying trolley and the laying mechanism. There are three main ways to use the PLC as the main controller for multi motor cooperative control, which are parallel closed-loop control, master-slave follow-up control and cross coupling control [13][14][15].
In order to better compare the advantages of various control strategies, choose the most suitable control strategy for each module of the system, establish a three-phase PMSM (Permanent magnet synchronous motor) vector control simulation model in MAT-LAB/Simulink, and analyze three common motor cooperative control strategies.
In the vector control method of the motor, it is necessary to transform the natural coordinate system of the motor into a synchronous rotation coordinate system of d-q two directions, that is, three-phase static becomes two-phase rotation. Therefore, in the simulation process, the three-phase PMSM vector control method with I d = 0 can be used, that is, the current component on the d-axis is zero, and all torques of the motor are controlled by the q-axis current I q , which realizes the decoupling of the torque control [16].
As shown in Figure 14, the control method uses the traditional PI (proportional integral controller) adjustment method, which mainly includes three parts: speed loop PI regulator (used to control motor speed), current loop PI regulator (control current I q to maintain torque) and the SVPWM algorithm (space vector pulse width modulation) [17].  The speed reduction ratio of the drive motor of the tray laying mechanism is 25:1, the total mass of the seedling tray with soil is about 20 kg, and the distance from the center of the seedling tray to the edge of the seedling tray is 150 mm, so the maximum torque during tray laying is about m 1.41N ⋅ .The total mass of the laying trolley is about 110 kg, the diameter of the driving rubber wheel is 60 mm, and the friction coefficient is about 0.8. It can be calculated that the torque acting on the driving wheel is about m 3.21N ⋅ . Therefore, the simulation conditions can be set as: the reference speed is 375 rpm, so that the laying mechanism completes a laying action in 4s, the initial load torque of motor 1 is According to the actual operation of the tray laying system, the two driving motors of the gantry truss, the two driving motors of the laying trolley and the laying mechanism are respectively simulated by different control strategies. The simulation results are The basic parameters of the motor in the simulation: pole number P n = 4 , stator resistance R = 0.958 Ω, stator inductance L d = 5.25 mH, L q = 12 mH, flux linkage ϕ f = 0.183 Wb, moment of inertia J = 0.003 Kg · m 2 , damping coefficient B = 0.008 N · m · s. The simulation conditions: voltage U dc = 311 V, sampling period T s = 10 us, PWM switching frequency f pwm = 10 kHz, using variable step size obe23 tb algorithm [18], speed loop PI regulator parameters B n = 0.013 , K pw = 0.14 , K iw = 7 and simulation time 0.3 s.
The reduction ratio of the gantry truss drive motor is 14:1. Considering that the total weight of the gantry truss, the tray laying trolley and the seedling tray is about 270 kg, the diameter of the driving rubber wheel is 80 mm, and the friction coefficient is about 0.8, the torque acting on the driving wheel can be calculated to be about 4.17 N · m. Therefore, the simulation conditions can be set as follows: the reference revolution is 1200 rpm, make the driving wheel move forward at the speed of 35 cm/s, the initial load torque T L1 = 4.17 N · m, and load disturbance torque T L2 = 10 N · m on motor 1 and motor 2, respectively in 0.1 s and 0.2 s.
The speed reduction ratio of the drive motor of the tray laying mechanism is 25:1, the total mass of the seedling tray with soil is about 20 kg, and the distance from the center of the seedling tray to the edge of the seedling tray is 150 mm, so the maximum torque during tray laying is about 1.41 N · m.The total mass of the laying trolley is about 110 kg, the diameter of the driving rubber wheel is 60 mm, and the friction coefficient is about 0.8. It can be calculated that the torque acting on the driving wheel is about 3.21 N · m.
Therefore, the simulation conditions can be set as: the reference speed is 375 rpm, so that the laying mechanism completes a laying action in 4s, the initial load torque of motor 1 is T L1 = 1.41 N · m, and the initial load torque of motor 2 is T L2 = 3.21 N · m. The disturbance torque T L3 = 10 N · m is applied to motor 1 and motor 2 in 0.1 s and 0.2 s, respectively.
According to the actual operation of the tray laying system, the two driving motors of the gantry truss, the two driving motors of the laying trolley and the laying mechanism are respectively simulated by different control strategies. The simulation results are shown in Figure 15. From the analysis of the simulation results, it can be seen that when the par closed-loop control is adopted for cooperative control, although each motor can main a stable output, the two motors are independent of each other. When one of the moto disturbed and the speed changes, the other motor will not adjust the disturbance in t and the system has poor coordination and weak anti-interference ability.
For the master-slave follow-up control strategy, there is a certain delay in the op tion of the two motors, and the response of the slave motor is slower than that o master motor. When the main motor is disturbed, the slave motor will also make tim adjustments following the change of the main motor's speed. However, the disturb of the slave motor is not fed back to the main motor, and the main motor cannot track adjust in time, resulting in the phenomenon that the two motors are not synchronize When the cross-coupling control strategy is adopted, when motor 1 and motor disturbed respectively at 0.1 s and 0.2 s, the other motor can be adjusted and followe time as the disturbance occurs.
Through the above-mentioned control strategy research and simulation compar combined with the experimental results of using independent program modules in laboratory field, as shown in Table 4, the control strategy of each module of the plate ing system can be matched. From the analysis of the simulation results, it can be seen that when the parallel closed-loop control is adopted for cooperative control, although each motor can maintain a stable output, the two motors are independent of each other. When one of the motors is disturbed and the speed changes, the other motor will not adjust the disturbance in time, and the system has poor coordination and weak anti-interference ability.
For the master-slave follow-up control strategy, there is a certain delay in the operation of the two motors, and the response of the slave motor is slower than that of the master motor. When the main motor is disturbed, the slave motor will also make timely adjustments following the change of the main motor's speed. However, the disturbance of the slave motor is not fed back to the main motor, and the main motor cannot track and adjust in time, resulting in the phenomenon that the two motors are not synchronized.
When the cross-coupling control strategy is adopted, when motor 1 and motor 2 are disturbed respectively at 0.1 s and 0.2 s, the other motor can be adjusted and followed in time as the disturbance occurs.
Through the above-mentioned control strategy research and simulation comparison, combined with the experimental results of using independent program modules in the laboratory field, as shown in Table 4, the control strategy of each module of the plate laying system can be matched. The length of the seedling field can reach 20-30 m. The two drive motors of the gantry truss need to be highly coordinated. Otherwise, the accumulation of errors for a long time will cause the truss to tilt or even fall off the track. Therefore, when any drive motor is disturbed, another one must follow in time. It can be seen from the table that the consistency of the two motors using the cross-coupling control strategy is the best, which can effectively ensure the stability and accuracy of the gantry truss running on the longitudinal track for a long time, and meet the requirements of the longitudinal movement of the laying system.
For the drive motor of the tray trolley and the laying mechanism, it can be seen from the data in the table that the same cross coupling control strategy is the best for tray laying. However, compared with the gantry truss drive motor, their synchronization accuracy is not high, and in the actual operation, the speed of the drive motor of the tray trolley and the laying mechanism is different, and the cross coupling control strategy is more complex. Realizing the cross coupling control of different speeds between the two motors will make the system algorithm huge and increase the operation burden of the system.
Using a master-slave follow-up control strategy, the algorithm is relatively simple. After the improvement, the two driving motors can maintain different speeds. When the laying mechanism completes a laying action, the fixed-point displacement of the laying trolley is just completed, which can greatly improve the efficiency and accuracy of laying.
It is necessary to overcome the problem that the disturbance of the slave shaft cannot be transmitted to the master shaft. The driving motor of the laying mechanism that is the most disturbed and the least controllable and stable is used as the master motor; at the same time, improving the anti-interference ability of the slave shaft itself can better ensure the synchronization of the entire system, which not only guarantees the efficiency and accuracy of tray laying, but also avoids the phenomenon of tray overlapping and stacking.

Cooperative Control Method Based on Sliding Mode Speed Control
The coordinated control of multiple motors is a key part of the entire laying system, and the synchronization accuracy will determine whether the performance of the entire system can meet the requirements of the field laying. Therefore, in the face of different control strategies, it is essential to design a control method that runs stably and can achieve precise synchronization for the control system of the laying system.
At present, the speed controllers in three-phase permanent magnet AC motors generally use traditional PI regulators, which have the characteristics of a simple algorithm, high reliability, and convenient parameter setting. However, the three-phase PMSM is a multi-variable nonlinear and strongly coupled system [19]. It can also be seen from the previous simulation results that when the system is affected by external disturbances or when the parameters such as motor start and stop change, the traditional PI control method has shortcomings such as untimely response and large fluctuations, which cannot meet the requirements of actual use.
In order to improve the dynamic quality of the three-phase PMSM speed control system, using the characteristics of sliding mode control to be insensitive to disturbances and parameter changes, and fast response speed, a sliding mode speed controller is designed to realize the coordinated control of the three-phase PMSM [20].
Firstly, the mathematical model of PMSM motor in the d − q coordinate system is established: where u d , u q are the d − q axis components of stator voltage respectively; i d , i q are the d − q axis components of stator current, respectively; R is the stator resistance; ω m is the angular velocity of the motor; p n is the number of poles of the motor; J is the moment of inertia; ϕ f is the flux linkage of permanent magnet; L s is the stator inductance; and T L is the load torque. For PMSM, the rotor field-oriented control method with i d = 0 can achieve better control effect, and Equation (1) can be simplified as: Define the state variables of the PMSM system: where ω re f is the reference or set speed of the motor, which is a constant and ω m is the actual speed.
Define the sliding mode function as: where c > 0 is the parameter to be designed. The derivation of Equation (4) can be obtained: In order to ensure that the three-phase PMSM drive system has a good dynamic response, the exponential approach method is adopted to obtain the expression of the controller: It can be seen from the above formula that because the controller contains an integral term, it can not only weaken the chattering phenomenon, but also eliminate the steady-state error of the system, and improve the control accuracy and performance. At the same time, using the controller expression of Equations (4)-(6), using the same motor parameters as the PI controller in Section 3, we build a simulation model based on the sliding mode speed controller [21], as shown in Figure 16.
In order to verify the advantages of the sliding mode speed controller compared to the traditional PI speed controller, a cross-coupling control strategy was built using the sliding mode speed controller model. Under the same simulation conditions, the simulation results are shown in Figure 17. In order to verify the advantages of the sliding mode speed controller compared to the traditional PI speed controller, a cross-coupling control strategy was built using the sliding mode speed controller model. Under the same simulation conditions, the simulation results are shown in Figure 17. Compared with Figure 15c, it can be seen that using sliding mode speed control, when the motor is disturbed, the system's regulation response is more timely and the control is smoother. The synchronization error between the two motors under the two control methods is shown in Figure 18. With traditional PI speed control, when the system is disturbed, the maximum motor synchronization error can reach 67 rpm, and the fluctuations are relatively severe. The maximum synchronization error of the motor using sliding mode speed control is 34 rpm, which is significantly lower than that, indicating that the system using the sliding mode speed controller has better dynamic performance and antidisturbance ability. In order to verify the advantages of the sliding mode speed controller compared to the traditional PI speed controller, a cross-coupling control strategy was built using the sliding mode speed controller model. Under the same simulation conditions, the simulation results are shown in Figure 17. Compared with Figure 15c, it can be seen that using sliding mode speed control, when the motor is disturbed, the system's regulation response is more timely and the control is smoother. The synchronization error between the two motors under the two control methods is shown in Figure 18. With traditional PI speed control, when the system is disturbed, the maximum motor synchronization error can reach 67 rpm, and the fluctuations are relatively severe. The maximum synchronization error of the motor using sliding mode speed control is 34 rpm, which is significantly lower than that, indicating that the system using the sliding mode speed controller has better dynamic performance and antidisturbance ability. Compared with Figure 15c, it can be seen that using sliding mode speed control, when the motor is disturbed, the system's regulation response is more timely and the control is smoother. The synchronization error between the two motors under the two control methods is shown in Figure 18. With traditional PI speed control, when the system is disturbed, the maximum motor synchronization error can reach 67 rpm, and the fluctuations are relatively severe. The maximum synchronization error of the motor using sliding mode speed control is 34 rpm, which is significantly lower than that, indicating that the system using the sliding mode speed controller has better dynamic performance and anti-disturbance ability. In order to verify the advantages of the sliding mode speed controller compar the traditional PI speed controller, a cross-coupling control strategy was built usin sliding mode speed controller model. Under the same simulation conditions, the sim tion results are shown in Figure 17. Compared with Figure 15c, it can be seen that using sliding mode speed co when the motor is disturbed, the system's regulation response is more timely and the trol is smoother. The synchronization error between the two motors under the two co methods is shown in Figure 18. With traditional PI speed control, when the system i turbed, the maximum motor synchronization error can reach 67 rpm, and the fluctua are relatively severe. The maximum synchronization error of the motor using sl mode speed control is 34 rpm, which is significantly lower than that, indicating tha system using the sliding mode speed controller has better dynamic performance and disturbance ability. In order to improve the efficiency of laying, the driving motor of the laying mechanism and the laying trolley is controlled by an improved master-slave follow-up strategy. The former is the main shaft, the latter is the slave shaft. However, different from the traditional master-slave servo control strategy, the master-slave servo control strategy based on the sliding mode speed controller is optimized to make the speed of the master shaft and the slave shaft different, maintain the servo characteristics, and improve the anti-interference ability of the driven shaft itself. Even if the driven shaft is disturbed, the fluctuation will be reduced to the minimum and the driven shaft will quickly return to the stable state.
The optimization strategy is simulated, as shown in Figure 19. The driving shaft speed is set to 375 rpm, and the reduction ratio is 25:1. The speed of the driven shaft is set at 300 rpm, and the gear ratio is 1.25:1, which can make the laying trolley move at a speed of 7.5 cm/s. Therefore, it is possible to complete a laying action and directional movement within 4 s, given the same disturbance to the driving shaft and the driven shaft at 0.1 s and 0.2 s, respectively. In order to improve the efficiency of laying, the driving motor of the laying mechanism and the laying trolley is controlled by an improved master-slave follow-up strategy. The former is the main shaft, the latter is the slave shaft. However, different from the traditional master-slave servo control strategy, the master-slave servo control strategy based on the sliding mode speed controller is optimized to make the speed of the master shaft and the slave shaft different, maintain the servo characteristics, and improve the anti-interference ability of the driven shaft itself. Even if the driven shaft is disturbed, the fluctuation will be reduced to the minimum and the driven shaft will quickly return to the stable state.
The optimization strategy is simulated, as shown in Figure 19. The driving shaft speed is set to 375 rpm, and the reduction ratio is 25:1. The speed of the driven shaft is set at 300 rpm, and the gear ratio is 1.25:1, which can make the laying trolley move at a speed of 7.5 cm/s. Therefore, it is possible to complete a laying action and directional movement within 4 s, given the same disturbance to the driving shaft and the driven shaft at 0.1 s and 0.2 s, respectively.

Results and Discussion
In order to test the actual working performance, the fully automatic tray laying system for rice seedlings was developed and tested in the field, as shown in Figure 20. The main evaluation index for judging whether the seedling tray is qualified is that there is no overlapping during the process of laying the tray, the horizontal spacing of the Figure 19. Optimization simulation of the master-slave servo control strategy based on sliding mode speed controller.

Results and Discussion
In order to test the actual working performance, the fully automatic tray laying system for rice seedlings was developed and tested in the field, as shown in Figure 20.

control.
In order to improve the efficiency of laying, the driving motor of the laying mech nism and the laying trolley is controlled by an improved master-slave follow-up strateg The former is the main shaft, the latter is the slave shaft. However, different from the tr ditional master-slave servo control strategy, the master-slave servo control strategy base on the sliding mode speed controller is optimized to make the speed of the master sha and the slave shaft different, maintain the servo characteristics, and improve the anti-i terference ability of the driven shaft itself. Even if the driven shaft is disturbed, the flu tuation will be reduced to the minimum and the driven shaft will quickly return to th stable state.
The optimization strategy is simulated, as shown in Figure 19. The driving sha speed is set to 375 rpm, and the reduction ratio is 25:1. The speed of the driven shaft is s at 300 rpm, and the gear ratio is 1.25:1, which can make the laying trolley move at a spee of 7.5 cm/s. Therefore, it is possible to complete a laying action and directional moveme within 4 s, given the same disturbance to the driving shaft and the driven shaft at 0.1 and 0.2 s, respectively.

Results and Discussion
In order to test the actual working performance, the fully automatic tray laying sy tem for rice seedlings was developed and tested in the field, as shown in Figure 20. The main evaluation index for judging whether the seedling tray is qualified is th there is no overlapping during the process of laying the tray, the horizontal spacing of th The main evaluation index for judging whether the seedling tray is qualified is that there is no overlapping during the process of laying the tray, the horizontal spacing of the tray is not more than 35 mm, the longitudinal spacing is not more than 25 mm, and the soil in the seed hole of the seedling tray does not turn over after the tray falls to the ground. The height of the seedling tray box when laying will also affect the quality of the tray placement. If the height is too high, the collision between the falling seedling tray and the ground will become stronger, and there will be a phenomenon that the substrate soil in the seedling tray will be shaken out. If the height is too low, due to the flatness of the seedling field, it is easy to cause the seedling tray box to scratch the ground, leading to the failure of laying the tray. At the same time, it will also make the lifting stroke of the seedling tray box larger and affect the efficiency. After the experiment, when the height of the tray box from the ground is 100 mm, the seedling tray placement effect is the best. Under this condition, the test of seedling tray laying in the field was carried out, as shown in Figure 21.
Agriculture 2021, 11, x FOR PEER REVIEW 19 of 23 tray is not more than 35 mm, the longitudinal spacing is not more than 25 mm, and the soil in the seed hole of the seedling tray does not turn over after the tray falls to the ground. The height of the seedling tray box when laying will also affect the quality of the tray placement. If the height is too high, the collision between the falling seedling tray and the ground will become stronger, and there will be a phenomenon that the substrate soil in the seedling tray will be shaken out. If the height is too low, due to the flatness of the seedling field, it is easy to cause the seedling tray box to scratch the ground, leading to the failure of laying the tray. At the same time, it will also make the lifting stroke of the seedling tray box larger and affect the efficiency. After the experiment, when the height of the tray box from the ground is 100 mm, the seedling tray placement effect is the best. Under this condition, the test of seedling tray laying in the field was carried out, as shown in Figure 21. First, prepare the 160 seedling trays that have been loaded with substrate soil for the total test, and prepare each stack of 7 and 9 trays, respectively (It can be set according to the width of the rice field). After calculation and setting, the tray trolley moves on the gantry truss at the speed of 7.5 cm/s, the motor of the laying mechanism is used to lay the tray at the speed of 375 rpm, and the gantry truss moves longitudinally at a fixed point at a speed of 35 cm/s. Test the actual operation of 160 seedling trays under the PI speed control method and the sliding mode speed control method, respectively. Record the horizontal and vertical spacing between each seedling tray, and the distribution is shown in Figure 22a,b. First, prepare the 160 seedling trays that have been loaded with substrate soil for the total test, and prepare each stack of 7 and 9 trays, respectively (It can be set according to the width of the rice field). After calculation and setting, the tray trolley moves on the gantry truss at the speed of 7.5 cm/s, the motor of the laying mechanism is used to lay the tray at the speed of 375 rpm, and the gantry truss moves longitudinally at a fixed point at a speed of 35 cm/s. Test the actual operation of 160 seedling trays under the PI speed control method and the sliding mode speed control method, respectively. Record the horizontal and vertical spacing between each seedling tray, and the distribution is shown in Figure 22a,b.
The stability of the gantry truss movement is also one of the key factors for the successful operation of the tray laying system. The total length of the seedling field is about 22 m, and the truss length is 8 m. The movement test of the gantry truss is carried out separately. Each time, the gantry truss moves 70 cm at the speed of 35 cm/s, and 60 round trips are a cycle. The angle between the center line of the two ends of the gantry truss and the track is recorded every 2 times (acute angle). Test the PI speed control and sliding mode speed control methods respectively, and the results are shown in Figure 23. The stability of the gantry truss movement is also one of the key factors for the successful operation of the tray laying system. The total length of the seedling field is about 22 m, and the truss length is 8 m. The movement test of the gantry truss is carried out separately. Each time, the gantry truss moves 70 cm at the speed of 35 cm/s, and 60 round trips are a cycle. The angle between the center line of the two ends of the gantry truss and the track is recorded every 2 times (acute angle). Test the PI speed control and sliding mode speed control methods respectively, and the results are shown in Figure 23.   The stability of the gantry truss movement is also one of the key factors for the successful operation of the tray laying system. The total length of the seedling field is about 22 m, and the truss length is 8 m. The movement test of the gantry truss is carried out separately. Each time, the gantry truss moves 70 cm at the speed of 35 cm/s, and 60 round trips are a cycle. The angle between the center line of the two ends of the gantry truss and the track is recorded every 2 times (acute angle). Test the PI speed control and sliding mode speed control methods respectively, and the results are shown in Figure 23.  Calculate the maximum, minimum, average, and variance of the seedling tray spacing, determine whether there is a phenomenon of overlapping trays and spacing exceeding the standard. Finally, the success rate of tray laying was calculated. The angle data between the gantry truss and the track is converted into the offset of the truss and the maximum, minimum, average and variance are also calculated. The results are shown in Table 5. It can be seen from the data in the table that the effect of sliding mode speed control is better than that of traditional PI speed control, the precision and stability of tray laying are significantly improved, and the lateral spacing of each tray can be maintained at 25 ± 5 mm, with longitudinal spacing of 15 ± 5 mm, the overall offset of gantry truss is controlled within 20 mm, and the qualified rate of seedling tray laying reaches 100%.
During the test, the time required for the tray laying system was recorded. It takes 150 s at most to lay 16 seedling trays by sliding mode speed control (including 30 s for two manual loading and 10 s for the trolley reset). Therefore, conservative calculation shows that the tray laying system can lay 380 trays in one hour, and the efficiency of tray laying is increased by 35.7%, which meets the technical requirements of mechanized field tray laying.

Conclusions
(1) The agronomic requirements for the horizontal and longitudinal spacing of the seedling tray and efficiency requirements during the tray laying process are to be met. In this paper, a rice tray automatic laying system based on multi motor cooperation is designed, and the multi motor control strategies of key modules are simulated and compared. For the longitudinal movement of the gantry truss, the cross coupling control strategy is adopted to detect and compensate for the synchronous position error of the two driving motors. For the driving motor of the tray laying trolley and the tray laying mechanism, an improved master-slave synchronization control strategy is adopted to improve the efficiency and accuracy of the tray placement. (2) Through calculations and field tests, the best combination of operating parameters of the system is obtained: The tray laying trolley moves on the gantry truss at the speed of 7.5 cm/s, and the gantry truss moves at a fixed point at a speed of 35 cm/s in the longitudinal direction. When the motor of the tray laying mechanism lays the tray at the speed of 375 rpm at the height of 100 mm from the ground, the system runs most reliably and stably. (3) In order to obtain higher quality and effect of laying, a PMSM sliding mode speed controller is designed, which is applied to the multi motor cooperative control strategy and optimized and simulated. The results of simulation and field tests showed that when the tray laying system was set at the best parameters, the horizontal spacing of tray was kept at 25 ± 5 mm, with longitudinal spacing of 15 ± 5 mm, and the overall offset of the gantry truss was controlled within 20 mm. The qualified rate of laying trays reaches 100%, and the laying efficiency can reach 380 trays/h, which meets the technical requirements of mechanized field laying.