## 3 Design of Adaptive PLC Control System
### Design Scheme of Adaptive Control System  
#### 3.2.1 Composition of Adaptive Control System  
1. Upper control system  
The upper control system should achieve the following requirements:  
1. Visualization to realize the interaction with the user, where the user can input soil quality parameters and output two working parameters to the upper computer.
2. The rotational speed, digging depth, transverse distance, center distance, and support angle of the two cutters are calculated by two variables: output and soil quality parameters. These can be displayed in real time for users to obtain information.
3. Can communicate with PLC.  
The upper control system adopts the PLC integrated machine, which is divided into the upper touch screen part and lower PLC control part. PLC internal variables are shown in Tables 2 and 3.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Variable Name** & **Description** & **Data Type** \\ \hline Tuzhicanshu & Parameter of Soil Environment & Short Integer \\ Chanliang & Productivity & Short Integer \\ Zhunsu1 & Speed to Left & Single Precision Floating Point \\ Zhuansu2 & Speed to Right & Single Precision Floating Point \\ Bujinliang & Stepping & Single Precision Floating Point \\ Washen & Excavation Depth & Single Precision Floating Point \\ Hengyisudu & Feeding Speed & Single Precision Floating Point \\ Zhuansull & Speed to Left Real Time & Single Precision Floating Point \\ Zhuansurr & Speed to Right Real Time & Single Precision Floating Point \\ Dianliul & Current to Left & Single Precision Floating Point \\ Dianliur & Current to Right & Single Precision Floating Point \\ \hline \hline \end{tabular}
\end{table}
Table 2: Internal reference scale.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**I/O** & **Register IP Address** & **Comment** \\ \hline X0 & X0 & Left Input Encoder Port \\ X1 & X1 & Right Input Encoder Port \\ X2 & X2 & Current Sensor Left Input Port \\ X3 & X3 & Current Sensor Right Input Port \\ Y0 & Y0 & Cutter Central Distance Output Port \\ Y1 & Y1 & Cutter Speed Left Output Port \\ Y2 & Y2 & Cutter Speed Right Output Port \\ D0 & D0 & Left Cutter Duty Cycle Register \\ D1 & D1 & Input Register in Left Cutter Encoder A \\ D2 & D2 & Right Cutter Duty Cycle Register \\ D3 & D3 & Input Register in Right Cutter Encoder A \\ D4 & D4 & Cutter’s Central Distance Initial Register \\ D5 & D5 & Cutter Central Distance Variable Register \\ D6 & D6 & Angle Initiation Register \\ M1 & M1 & Running Switch \\ \hline \hline \end{tabular}
\end{table}
Table 3: I/O variable address assignment table.  
D variable here is a register that can store 32 bit values. The variable M is the switch quantity, the key on the correlation interface, triggers the interface event, which can change the M value.  
2. Support drive system  
The bracket drive system consists of servo driver, dc motor and encoder, stepper motor driver, and stepper motor to meet the functional requirements: (1) the angle and (2) the bracket in the rotatable range of the bracket can realize the forward and backward rotation of the three wire rod slide rail can be moved in any position.  
3. Cutter drive system  
The cutter servo drive system consists of a DC motor driver and DC motor. PLC is the number of pulse inputs per unit time in the adaptive system the cutter speed is calculated. If the specified speed is not reached, the duty cycle of the motor output pulse is increased until the cutter is turned to the specified speed.  
4. Current sensors  
In this system, the current sensor should be responsible for monitoring the current of the left and right cutter motor to judge the load change. The current sensor can measure the current within 10 A \(\pm\) the system. Corresponding analog output: 185 mV/A, 0 current output for the power supply midpoint voltage isolation, stable performance. A current sensor output the output voltage analog to the PLC.