# Design and Testing of an Intelligent Control System for Maize Picking Harvest
## 2 Materials and Methods
### Software Algorithm  
#### 2.2.1 Control Strategy  
The control system software is divided into modules: for initialization, signal input and output, acquisition and processing of the sensor signals, CAN signal sending and receiving, and logic control. The logic control includes manual and automatic control modes. Figure 3 shows the software structure diagram. After the control system is initiated, the operator can set the driving mode (parking, road, or operation) and harvest mode (manual control or automatic control). In the road and operation modes, the operator can manually adjust the header height, driving speed, and rotational speed of the pulling rollers through the corresponding keys. When the operation mode is set to automatic, the system adjusts the maize picking loss adaptively. The control system exits automatic control and returns to manual control if any manual control key is touched during the automatic harvesting process.  
The control mode has two main control loops, namely, faster and slower loops. Previous research and experimental results have shown that the rotational speed of the pulling rollers has the most significant effect on the maize picking loss [21; 22]. Thus, the rotational speed of the pulling rollers should be adjusted in real time depending on the maize picking loss rate, and the operating speed should match the rotational speed of the pulling rollers [23]. The faster loop regulates the rotational speed of the pulling rollers and the operating speed, and the slower loop regulates the header height. When the maize picking loss rate (MPL) exceeds the target range (0, \(\text{MPL}_{\text{opt}}\) + \(\text{AMPL}\)), the faster loop adjusts the pulling rollers and operating speed. If MPL still exceeds the target range, the slower control loop fine-tunes the header height to optimize the maize picking loss rate. The values of the input parameters for both loops are determined by the prediction model and experimental data.  
Figure 4 shows a block diagram of the intelligent control system for maize picking. If the maize picking loss rate exceeds the target range, the controller first calculates the target values (rotational speed of the pulling rollers \(n_{1}\), operating speed \(v_{1}\), and header height \(h_{1}\)) as derived from the data-based prediction model. Then, the current values (\(n_{2}\), \(v_{2}\), and \(h_{2}\), respectively) are collected by the sensors in  
Figure 2: Structure block diagram of the hardware system.  
real time. The difference between \(n_{1}\) and \(n_{2}\) (i.e., \(n_{e}\)) and the deviation change rate (i.e., \(n_{ec}\)) are used as the input to the fuzzy PID controller for the rotational speed of the pulling rollers. The difference between \(v_{1}\) and \(v_{2}\) (i.e., \(v_{e}\)) and the deviation change rate (i.e., \(v_{ec}\)) are used as the input to the fuzzy PID controller for the operating speed. The difference between \(h_{1}\) and \(h_{2}\) (i.e., \(h_{e}\)) is used as the input to the PID controller for the header height. The above three controllers are used to optimize the working parameters and maintain the maize picking loss rate within the target range to meet harvest requirements.  
Figure 4: Control block diagram of intelligent control system for maize picking. n*, h*, v* are the outputs value of three controllers.  
Figure 3: Software structure diagram.