# Design and Control Simulation Analysis of Tender Tea Bud Picking Manipulator
## 4 Simulation Results and Analysis
### Control System Modeling and Stability Analysis  
#### 4.1.1 Modeling of SMC-PID Control System  
For dynamic modeling of the picking manipulator joints, the relationship between moment and acceleration is as follows:  
\[\Gamma=J\beta \tag{9}\]  
where \(\Gamma\) is the moment, \(J\) is the rotational inertia of the rotating joint, \(\tilde{\theta}\) is the angular acceleration of the rotating joint,  
The manipulator joint rotation deviation angle \(e\) is:  
\[e=\theta-\theta_{o} \tag{10}\]  
where \(\theta\) is the desired rotation angle, \(\theta_{o}\) is the actual rotation angle, and the above Equation (9) can be obtained by taking the first and second derivatives:  
\[\begin{split}\dot{e}&=\dot{\theta}-\dot{\theta}_{o }\\ \ddot{e}&=\ddot{\theta}-\ddot{\theta}_{o}\end{split} \tag{11}\]  
where \(\dot{e}\) is the rotational deviation angular velocity, \(\ddot{e}\) is the rotational deviation angular acceleration, \(\dot{\theta}\) is the desired rotational angular velocity, \(\ddot{\theta}\) is the desired rotational angular acceleration, \(\dot{\theta}_{o}\) is the actual rotational angular velocity, and \(\ddot{\theta}_{o}\) is the actual rotational angular acceleration, when the manipulator structure is in an initial equilibrium condition \(\dot{\theta}_{o}=0,\dot{\theta}_{o}=0\). Therefore:  
\[\dot{e}=\dot{\theta},\dot{e}=\ddot{\theta} \tag{12}\]  
Design of slide mode control for slide mode surfaces \(s\):  
\[s=ce+\dot{e} \tag{13}\]  
The derivation of this leads to equation:  
\[\dot{s}=c\dot{e}+\ddot{e} \tag{14}\]  
Bringing Equation (14) into Equation (9), the control torque equation for the sliding mode controller can be obtained:  
\[\Gamma=J(\dot{s}-c\dot{e}) \tag{15}\]  
An exponential convergence rate is chosen, which is given by the following formula:  
\[\dot{s}=-\lambda\,\text{sgn}(s)-ks\ \ \ \ \ \lambda>0,k>0 \tag{16}\]Among them:  
\[\text{sgn}(s)=\left\{\begin{array}{l}s>0,\text{sgn}(s)=1\\ s=0,\text{sgn}(s)=0\\ s<0,\text{sgn}(s)=-1\end{array}\right. \tag{17}\]  
where \(\text{sgn}(s)\) is a symbolic function.  
Based on the above derivation, Equation (16) can be brought into Equation (15) to obtain the manipulator joint control torque as:  
\[\Gamma=J(-\lambda\,\text{sgn}(s)-ks-c\dot{e}) \tag{18}\]  
Utilizing Equation (9) as the basis for the sliding mode control structure in rotation, traditional sliding mode control encounters challenges during motor output control, leading to violent jitter and limitations in achieving high-precision control. To address this issue, a hybrid approach known as the SMC-PID control method is designed. This method integrates PID controllers to handle the system's error signals, allowing the sliding mode controller to directly influence the system state changes. This hybrid approach effectively mitigates the jitterly control torque situation, enabling precise control of the system:  
We design the sliding mould surface using the PID parameter design as follows:  
\[s=K_{p}e+K_{i}\int_{0}^{t}edt+K_{d}\dot{e}\ \ \ \ \ K_{p},K_{i},K_{d}>0 \tag{19}\]  
Its derivation is shown below:  
\[\dot{s}=K_{p}e+K_{i}e+K_{d}\dot{e} \tag{20}\]  
Bringing the above Equation (20) into Equation (18), then the joint control moments of the manipulator system can be obtained as follows:  
\[\begin{split}&\Gamma=\frac{J}{K_{d}}(\dot{s}-K_{p}\dot{e}-K_{i}e) =\\ &\frac{J}{K_{d}}(-\lambda\,\text{sgn}-ks-K_{p}\dot{e}-K_{i}e)\ \ \ \ \ \lambda>0,k>0\end{split} \tag{21}\]  
where the specific parameter settings in the SMC-PID control are shown in Table 2.