## 4 Simulation  
### Simulation Platform and Parameter  
According to the dynamic model and control law established in the above section, this section simulates the nonlinear space state equation of the flexible manipulator by designing a controller. This simulation compares the dynamic surface method of the backstepping space state equation with the boundary control method of the linear state equation. Generally, displacement, velocity, angle, angular velocity, force, torque, and other variables are used to measure the quality of vibration suppression. In this paper, the error analysis method is used to compare the two variables of displacement and velocity. The Simulink platform is used to build the controller. The designed controller structure is shown in Figure 3, where \(C\) is the fourth-order unit matrix. In this simulation, because the external disturbance of the manipulator is random and uncertain, the type of vibration is also very complex and changeable, so it cannot be simulated one by one. Therefore, this paper sets three different vibration types to inter-fere with the vibration of the manipulator to analyze the vibration suppression effect of the proposed algorithm. The selected vibration interference is shown as follows:  
\[\left\{ \begin{array}{l}w_{1}=0.06\sin(t)\\ w_{2}=0.06\sin(t)+0.04\sin(3t)\\ w_{3}=0.06\sin(t)+0.04\sin(3t)+0.06\sin(3t)\end{array} \right. \tag{43}\]  
Figure 3: Structure diagram of the controller. where is the simplest harmonic vibration wave, the amplitude is 0.06 mm, and the frequency is 0.159 Hz. For easy comparison, it is based on adding a low amplitude, high-frequency harmonic vibration. When the frequency of the simple harmonic vibration is increased and the amplitude is superimposed, the vibration suppression effect of the proposed control algorithm on the manipulator is observed. The maximum amplitude is 0.1 mm and the maximum frequency is 0.4774 Hz based on adding a simple harmonic vibration with a higher relative amplitude and higher frequency. Three different simple harmonic vibrations are superimposed on each other to simulate the external interference of the manipulator in a complex environment with a maximum frequency of 0.4774 Hz and a maximum amplitude of 0.16 mm. A flexible manipulator driven by a motor is used for the simulation. The dynamic equation of the system is as follows:  
\[\left\{ \begin{array}{l}\dot{x}_{1}=x_{2}\\ \dot{x}_{2}=-\frac{B}{M_{t}}x_{2}+\frac{N}{M_{t}}f(x_{1},x_{2})+\frac{K_{t}}{M _{t}}x_{3}\\ \dot{x}_{3}=-\frac{R}{L}x_{3}-\frac{K_{t}}{L}x_{2}+\frac{1}{L}u-w\\ y=x_{1}\end{array} \right. \tag{44}\]  
where the parameters are \(x_{1}=\theta\), \(x_{2}=\dot{\theta}\), \(x_{3}=I\), \(M_{t}=J+\frac{1}{3}ml^{2}+\frac{1}{10}Ml^{2}D\), and \(N=mgl+Mgl\); \(f\) is an unknown nonlinear function; \(\theta\) is connecting rod angle; \(I\) is the electric current and \(u\) is the control voltage of the motor. The physical meanings and parameter settings of the variables in the above expression are as Table 2.  
Taking the expected trajectory as \(y_{d}=\sin(t)\), the nonlinear function is \(f=\sin(\theta)\), and the controller parameters are \(\rho=1\), \(\lambda_{1}=3\), \(\lambda_{2}=8.5\), \(\lambda_{3}=8.5\), \(k_{1}=k_{2}=k_{3}=1.5\), and \(r_{1}=r_{2}=r_{3}=2\). The initial system status is \(x(0)=[0.5\pi\)\(0\)\(0]^{7}\). The initial value \(\theta_{1}(0)\) and \(\theta_{2}(0)\) is zero. The first set of the boundary control method based on linear state space equations based on an RBF neural network is designed for comparison. The dynamic equations established are as follows:  
\[\left\{ \begin{array}{l}\dot{x}_{1}=x_{2}\\ \dot{x}_{2}=-\frac{1}{L}[m_{L}gL_{L}x_{2}+EI(x_{1}-x_{3})]\\ \dot{x}_{3}=x_{4}\\ \dot{x}_{4}=-\frac{1}{l_{m}}[m_{m}gL_{m}-EI(x_{1}-x_{3})-u]\end{array} \right.